diff options
author | Stepan Moskovchenko <stevenm@rockbox.org> | 2006-10-03 21:09:47 +0000 |
---|---|---|
committer | Stepan Moskovchenko <stevenm@rockbox.org> | 2006-10-03 21:09:47 +0000 |
commit | c84461fb8f9404b2b32d90a649b63b669e1a6bb8 (patch) | |
tree | 4b9e5b78b1abb5bfc6eccb61a86236427cb32bf4 /apps/plugins/midi/sequencer.c | |
parent | f5a356989980aeabdfb6446d65d54cf8ec7928ab (diff) |
More adsr related nonsense, argh! Fix adsr related problem on some notes being stopped instead of
looped. Ramping code still not quite right, but dont want to lose this.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11117 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/midi/sequencer.c')
-rw-r--r-- | apps/plugins/midi/sequencer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/plugins/midi/sequencer.c b/apps/plugins/midi/sequencer.c index ebd5b76405..fdfd5d7620 100644 --- a/apps/plugins/midi/sequencer.c +++ b/apps/plugins/midi/sequencer.c @@ -119,12 +119,13 @@ long pitchTbl[] ICONST_ATTR={ 73297,73330,73363,73396,73429,73462,73495,73528 }; + void findDelta(struct SynthObject * so, int ch, int note) { struct GWaveform * wf = patchSet[chPat[ch]]->waveforms[patchSet[chPat[ch]]->noteTable[note]]; so->wf=wf; - unsigned long delta= 0; /* More percision- extra bit - not so off-key as before */ + unsigned int delta= 0; delta = (((gustable[note]<<FRACTSIZE) / (wf->rootFreq)) * wf->sampRate / (SAMPLE_RATE)); delta = (delta * pitchTbl[chPW[ch]])>> 16; @@ -248,10 +249,11 @@ void pressNote(int ch, int note, int vol) } } } - +inline void stopVoice(struct SynthObject * so); void releaseNote(int ch, int note) { + if(ch==9) return; |