summaryrefslogtreecommitdiff
path: root/apps/plugins/midi/sequencer.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/midi/sequencer.c')
-rw-r--r--apps/plugins/midi/sequencer.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/apps/plugins/midi/sequencer.c b/apps/plugins/midi/sequencer.c
index 3c026276c2..b6fb592294 100644
--- a/apps/plugins/midi/sequencer.c
+++ b/apps/plugins/midi/sequencer.c
@@ -111,7 +111,7 @@ long pitchTbl[] ICONST_ATTR={
111 72901,72934,72967,72999,73032,73065,73098,73131,73164,73197,73230,73264, 111 72901,72934,72967,72999,73032,73065,73098,73131,73164,73197,73230,73264,
112 73297,73330,73363,73396,73429,73462,73495,73528 112 73297,73330,73363,73396,73429,73462,73495,73528
113}; 113};
114 114/*
115void findDelta(struct SynthObject * so, int ch, int note) 115void findDelta(struct SynthObject * so, int ch, int note)
116{ 116{
117 117
@@ -120,6 +120,22 @@ void findDelta(struct SynthObject * so, int ch, int note)
120 so->delta = (((gustable[note]<<10) / (wf->rootFreq)) * wf->sampRate / (SAMPLE_RATE)); 120 so->delta = (((gustable[note]<<10) / (wf->rootFreq)) * wf->sampRate / (SAMPLE_RATE));
121 so->delta = (so->delta * pitchTbl[chPW[ch]])>> 16; 121 so->delta = (so->delta * pitchTbl[chPW[ch]])>> 16;
122} 122}
123*/
124
125
126void findDelta(struct SynthObject * so, int ch, int note)
127{
128
129 struct GWaveform * wf = patchSet[chPat[ch]]->waveforms[patchSet[chPat[ch]]->noteTable[note]];
130 so->wf=wf; // \|/ was 10
131
132 unsigned long delta= 0 ;
133
134 delta = (((gustable[note]<<FRACTSIZE) / (wf->rootFreq)) * wf->sampRate / (SAMPLE_RATE));
135 delta = (delta * pitchTbl[chPW[ch]])>> 16;
136
137 so->delta = delta;
138}
123 139
124inline void setPW(int ch, int msb, int lsb) 140inline void setPW(int ch, int msb, int lsb)
125{ 141{