⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 instruments.h

📁 一个96K的3D游戏源码
💻 H
📖 第 1 页 / 共 5 页
字号:

const double instruments[] = 
{
      33,

      // ----------------------------------------
      // Strings
      // ----------------------------------------

      // Oscillator 1
      1,          // Active?
      COMBINE_ADD,// Combine Method
      1.0,        // Amplitude ( 0.0 to 1.0 )
      4,          // Amplitude LFO No.  (0=off)
      0,          // Start pitch ( 0 = dependent to note )
      1,          // Pitch Mod. 
      0,          // Pitch LFO No. (0=off)
      0.0,        // Pitch step
      0,          // Pitch step accelleration
      WF_SAWTOOTH,    // Waveform 
      0.0,        // Panning (-1.0 to 1.0)
      2,          // Panning LFO No. (0=off)
      0,          // Phase shift left  (0.0 - 1.0)
      0.55,       // Phase shift right (0.0 - 1.0)
      0.5,        // Pulse width for WF_SQUAREWAVE
      0,          // Pulse width LFO

      // Oscillator 2
      1,          // Active?
      COMBINE_ADD,// Combine Method
      0.5,        // Amplitude ( 0.0 to 1.0 )
      4,          // Amplitude LFO No.  (0=off)
      0,          // Start pitch ( 0 = dependent to note )
      4.02,          // Pitch Mod. 
      0,          // Pitch LFO No. (0=off)
      0.0,        // Pitch step
      0,          // Pitch step accelleration
      WF_SQUAREWAVE,    // Waveform 
      0.0,        // Panning (-1.0 to 1.0)
      0,          // Panning LFO No. (0=off)
      0.3,       // Phase shift left  (0.0 - 1.0)
      0.6,        // Phase shift right (0.0 - 1.0)
      0.5,        // Pulse width for WF_SQUAREWAVE
      3,          // Pulse width LFO

      // Oscillator 3
      1,          // Active?
      COMBINE_ADD,// Combine Method
      0.45,        // Amplitude ( 0.0 to 1.0 )
      4,          // Amplitude LFO No.  (0=off)
      0,          // Start pitch ( 0 = dependent to note )
      8.08,          // Pitch Mod. 
      0,          // Pitch LFO No. (0=off)
      0.0,        // Pitch step
      0,          // Pitch step accelleration
      WF_SINE,    // Waveform 
      0.0,        // Panning (-1.0 to 1.0)
      2,          // Panning LFO No. (0=off)
      0,        // Phase shift left  (0.0 - 1.0)
      0.25,        // Phase shift right (0.0 - 1.0)
      0.5,        // Pulse width for WF_SQUAREWAVE
      0,          // Pulse width LFO

      // Amplitude Parameters
      1,          // Continuous? (1 = yes, 0 = no)
      0,          // Attack (ms)
      0,          // Decay (ms)
      0,          // Sustain (ms)
      200,        // Release (ms)  
      0.8,        // Sustain amplitude ( 0.0 to 1.0 )

      // Lowpass Filter
      1,          // Active?
      3500,       // Frequency cutoff (Hz)
      0.8,        // Resonance ( 0.0 to 1.0 )
      1,          // Cutoff LFO No. 
      0,          // Resonance LFO No.

      // Highpass Filter
      0,          // Active?
      1000,       // Frequency cutoff (Hz)
      0.5,        // Resonance ( 0.0 to 1.0 )
      0,          // Cutoff LFO No. 
      0,          // Resonance LFO No.

      // LFO 1
      WF_SINE,    // LFO Waveform
      0,          // Reset when note retriggers
      0.1,        // Rate (hz)
      1500,        // Depth

      // LFO 2
      WF_SINE,    // LFO Waveform
      1,          // Reset when note retriggers
      0.5,        // Rate (hz)
      0.2,        // Depth

      // LFO 3
      WF_SINE,    // LFO Waveform
      0,          // Reset when note retriggers
      0.2,        // Rate (hz)
      0.4,        // Depth

      // LFO 4
      WF_SINE,     // LFO Waveform
      1,          // Reset when note retriggers
      0.5,        // Rate (hz)
      0.2,        // Depth

      // LFO 5
      WF_OFF,     // LFO Waveform
      1,          // Reset when note retriggers
      1.0,        // Rate (hz)
      0.0,        // Depth

      // LFO 6
      WF_OFF,     // LFO Waveform
      1,          // Reset when note retriggers
      1.0,        // Rate (hz)
      0.0,        // Depth

      // Gain / Distortion
      0,          // Distortion (0->no distortion / 10->max distortion)
      0.6,        // Gain value

      // ----------------------------------------
      // Steel drum
      // ----------------------------------------

      // Oscillator 1
      1,          // Active?
      COMBINE_ADD,// Combine Method
      1.5,        // Amplitude ( 0.0 to 1.0 )
      1,          // Amplitude LFO No.  (0=off)
      0,          // Start pitch ( 0 = dependent to note )
      1,          // Pitch Mod. 
      0,          // Pitch LFO No. (0=off)
      0.0,        // Pitch step
      0,          // Pitch step accelleration
      WF_SINE,    // Waveform 
      0.0,        // Panning (-1.0 to 1.0)
      0,          // Panning LFO No. (0=off)
      0,          // Phase shift left  (0.0 - 1.0)
      0.2,        // Phase shift right (0.0 - 1.0)
      0.5,        // Pulse width for WF_SQUAREWAVE
      0,          // Pulse width LFO

      // Oscillator 2
      1,          // Active?
      COMBINE_ADD,// Combine Method
      0.5,        // Amplitude ( 0.0 to 1.0 )
      1,          // Amplitude LFO No.  (0=off)
      0,          // Start pitch ( 0 = dependent to note )
      1,          // Pitch Mod. 
      0,          // Pitch LFO No. (0=off)
      0.0,        // Pitch step
      0,          // Pitch step accelleration
      WF_TRIANGLE, // Waveform 
      0.0,        // Panning (-1.0 to 1.0)
      0,          // Panning LFO No. (0=off)
      0.15,       // Phase shift left  (0.0 - 1.0)
      0.35,       // Phase shift right (0.0 - 1.0)
      0.5,        // Pulse width for WF_SQUAREWAVE
      0,          // Pulse width LFO

      // Oscillator 3
      1,          // Active?
      COMBINE_ADD,// Combine Method
      0.3,        // Amplitude ( 0.0 to 1.0 )
      1,          // Amplitude LFO No.  (0=off)
      0,          // Start pitch ( 0 = dependent to note )
      1,          // Pitch Mod. 
      0,          // Pitch LFO No. (0=off)
      0.0,        // Pitch step
      0,          // Pitch step accelleration
      WF_SAWTOOTH,  // Waveform 
      0.0,        // Panning (-1.0 to 1.0)
      0,          // Panning LFO No. (0=off)
      0,          // Phase shift left  (0.0 - 1.0)
      0.1,          // Phase shift right (0.0 - 1.0)
      0.5,        // Pulse width for WF_SQUAREWAVE
      0,          // Pulse width LFO

      // Amplitude Parameters
      0,          // Continuous? (1 = yes, 0 = no)
      0,          // Attack (ms)
      0,          // Decay (ms)
      0,          // Sustain (ms)
      400,        // Release (ms)  
      1.0,        // Sustain amplitude ( 0.0 to 1.0 )

      // Lowpass Filter
      1,          // Active?
      2000,       // Frequency cutoff (Hz)
      0.8,        // Resonance ( 0.0 to 1.0 )
      2,          // Cutoff LFO No. 
      0,          // Resonance LFO No.

      // Highpass Filter
      0,          // Active?
      400,       // Frequency cutoff (Hz)
      0.5,        // Resonance ( 0.0 to 1.0 )
      0,          // Cutoff LFO No. 
      0,          // Resonance LFO No.

      // LFO 1
      WF_SINE,    // LFO Waveform
      1,          // Reset when note retriggers
      1.0,        // Rate (hz)
      -200,       // Depth

      // LFO 2
      WF_SINE,    // LFO Waveform
      1,          // Reset when note retriggers
      1.0,        // Rate (hz)
      -1000,      // Depth

      // LFO 3
      WF_SINE,     // LFO Waveform
      1,          // Reset when note retriggers
      0.2,        // Rate (hz)
      0.25,        // Depth

      // LFO 4
      WF_SQUAREWAVE,   // LFO Waveform
      1,          // Reset when note retriggers
      8.0,        // Rate (hz)
      0.5,        // Depth

      // LFO 5
      WF_OFF,     // LFO Waveform
      1,          // Reset when note retriggers
      1.0,        // Rate (hz)
      0.0,        // Depth

      // LFO 6
      WF_OFF,     // LFO Waveform
      1,          // Reset when note retriggers
      1.0,        // Rate (hz)
      0.0,        // Depth

      // Gain / Distortion
      0,          // Distortion (0->no distortion / 10->max distortion)
      1.7,        // Gain value

      // ----------------------------------------
      // Snare
      // ----------------------------------------

      // Oscillator 1
      1,          // Active?
      COMBINE_ADD,// Combine Method
      1.0,        // Amplitude ( 0.0 to 1.0 )
      0,          // Amplitude LFO No.  (0=off)
      100,        // Start pitch ( 0 = dependent to note )
      1.0,        // Pitch Mod. 
      0,          // Pitch LFO No. (0=off)
      -20,        // Pitch step
      0,          // Pitch step accelleration
      WF_SAWTOOTH, // Waveform 
      0.0,        // Panning (-1.0 to 1.0)
      0,          // Panning LFO No. (0=off)
      0,          // Phase shift left  (0.0 - 1.0)
      0.2,        // Phase shift right (0.0 - 1.0)
      0.5,        // Pulse width for WF_SQUAREWAVE
      0,          // Pulse width LFO

      // Oscillator 2
      1,          // Active?
      COMBINE_ADD,// Combine Method
      1.0,        // Amplitude ( 0.0 to 1.0 )
      0,          // Amplitude LFO No.  (0=off)
      0,          // Start pitch ( 0 = dependent to note )
      1.0,        // Pitch Mod. 
      0,          // Pitch LFO No. (0=off)
      0.0,        // Pitch step
      0,          // Pitch step accelleration
      WF_WHITENOISE,   // Waveform 
      0.0,        // Panning (-1.0 to 1.0)
      0,          // Panning LFO No. (0=off)
      0,          // Phase shift left  (0.0 - 1.0)
      0,          // Phase shift right (0.0 - 1.0)
      0.5,        // Pulse width for WF_SQUAREWAVE
      0,          // Pulse width LFO

      // Oscillator 3
      1,          // Active?
      COMBINE_ADD,// Combine Method
      1.0,        // Amplitude ( 0.0 to 1.0 )
      0,          // Amplitude LFO No.  (0=off)
      200,        // Start pitch ( 0 = dependent to note )
      4,          // Pitch Mod. 
      0,          // Pitch LFO No. (0=off)
      -80,        // Pitch step
      0,          // Pitch step accelleration
      WF_SINE,    // Waveform 
      0.0,        // Panning (-1.0 to 1.0)
      2,          // Panning LFO No. (0=off)
      0,          // Phase shift left  (0.0 - 1.0)
      0.3,        // Phase shift right (0.0 - 1.0)
      0.5,        // Pulse width for WF_SQUAREWAVE
      0,          // Pulse width LFO

      // Amplitude Parameters
      0,          // Continuous? (1 = yes, 0 = no)
      0,          // Attack (ms)
      0,          // Decay (ms)
      0,          // Sustain (ms)
      60,         // Release (ms)  
      1.0,        // Sustain amplitude ( 0.0 to 1.0 )

      // Lowpass Filter
      0,          // Active?
      1000,       // Frequency cutoff (Hz)
      0,          // Resonance ( 0.0 to 1.0 )
      0,          // Cutoff LFO No. 
      0,          // Resonance LFO No.

      // Highpass Filter
      0,          // Active?
      500,        // Frequency cutoff (Hz)
      0.5,        // Resonance ( 0.0 to 1.0 )
      0,          // Cutoff LFO No. 
      0,          // Resonance LFO No.

      // LFO 1
      WF_SINE,    // LFO Waveform
      1,          // Reset when note retriggers
      6.0,        // Rate (hz)
      2000.0,      // Depth

      // LFO 2
      WF_OFF,     // LFO Waveform
      1,          // Reset when note retriggers
      4.0,        // Rate (hz)
      0.5,        // Depth

      // LFO 3
      WF_OFF,     // LFO Waveform
      1,          // Reset when note retriggers
      1.0,        // Rate (hz)
      0.0,        // Depth

      // LFO 4
      WF_OFF,     // LFO Waveform
      1,          // Reset when note retriggers
      0.3,        // Rate (hz)
      4.0,        // Depth

      // LFO 5
      WF_OFF,     // LFO Waveform
      1,          // Reset when note retriggers
      1.0,        // Rate (hz)
      0.0,        // Depth

      // LFO 6
      WF_OFF,     // LFO Waveform
      1,          // Reset when note retriggers
      1.0,        // Rate (hz)
      0.0,        // Depth

      // Gain / Distortion
      0,          // Distortion (0->no distortion / 10->max distortion)
      2.0,        // Gain value

      // ----------------------------------------
      // Basedrum
      // ----------------------------------------

      // Oscillator 1
      1,          // Active?
      COMBINE_ADD,// Combine Method
      4.0,        // Amplitude ( 0.0 to 1.0 )
      0,          // Amplitude LFO No.  (0=off)
      250,        // Start pitch ( 0 = dependent to note )
      1.0,        // Pitch Mod. 
      0,          // Pitch LFO No. (0=off)
      -50,        // Pitch step
      0,          // Pitch step accelleration
      WF_SINE,    // Waveform 
      0.0,        // Panning (-1.0 to 1.0)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -