Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using System;
- public class H2_Chroma : MonoBehaviour
- {
- AudioSource notePlayer_src;
- AudioClip notePlayer_clip;
- int notePlayer_writeHead;
- float shepardVol = 1.0f;
- class ClockItem
- {
- public F4d_CombTidy combFilter;
- public GameObject combCapsule;
- public G2a_Shepard shepardTone;
- public GameObject tonemeCapsule;
- public float volRecent;
- public ClockItem( int noteIndex )
- {
- float freq_A4_Midi69 = 440.0f;
- const int midiNote_A4 = 69;
- const int midiNote_A1 = 33;
- const int midiNote_C2 = midiNote_A1 + 3;
- const int midiNote_C0 = midiNote_C2 - 24;
- const int midiNote_FG2 = midiNote_A1 + 9;
- int midiNote_lowest = midiNote_FG2;
- int clockPos;
- float freq;
- {
- int midiNote = midiNote_lowest + noteIndex;
- clockPos = ( midiNote - midiNote_C0 ) % 12; // remember C is at 12 O'clock
- freq = freq_A4_Midi69 * Mathf.Pow( 2.0f, ( midiNote - midiNote_A4 ) / 12.0f );
- }
- volRecent = 0.0f;
- // COMB FILTER
- this.combFilter = new F4d_CombTidy( freq, 0.5f );
- // SHEPARD TONE
- // error CS0038: Cannot access a nonstatic member of outer type `UnityEngine.Component' via nested type `H2_Chroma.ClockItem'
- this.shepardTone = new G2a_Shepard( clockPos, transform );
Add Comment
Please, Sign In to add comment