OPLL frequency calculation & pitch bend - BLARGH!?

Página 2/2
1 |

Por Manuel

Ascended (19303)

Imagen del Manuel

21-01-2011, 18:43

WORP3, well, your calculation is the same as my script, in combination with:

variable loga [expr log(pow(2, 1/12.0))]
variable r3 [expr log(440.0)/$loga - 57]

proc freq_to_note { freq } {
        variable loga
        variable r3
        return [expr {($freq < 16) ? -1 : (log($freq)/$loga - $r3)}]
}

Por WORP3

Paladin (864)

Imagen del WORP3

21-01-2011, 23:11

If both our formula's are the same, then i guess it's clear Big smile
It's not that hard if you take the time to write it out !

The hard thing to do with the MIDI-PAC is making it support both 3.57 and 3.6 MHz F-numbers !

Por ARTRAG

Enlighted (6932)

Imagen del ARTRAG

31-07-2016, 23:40

Sorry for resurrecting the thread but I need an info about volume control in OPLL

R#30,R#31 and followings hold the volume on 4 bits, 0 is the max amplitude, 15 is the minimum volume.
Actually 15 is not MUTE, just very low.

How can I mute a channel ? I did that by resetting octave and f-num to 0,
This gives frequency = 0Hz, but there has to be something more appropriate, isn't there?

Por wouter_

Champion (508)

Imagen del wouter_

01-08-2016, 09:19

I assume you're asking this in the context of the Voice synthesis on ISR thread? You can use the Key-On bit (bit 4 in registers R#20-R#28) as an enable/disable bit.

More in detail, the Key-On bit controls the ADSR envelope of the channel. For the specific custom instrument settings I gave, the attack/decay/release rates (registers R#04-R#07) are set infinitely fast, thus the Key-On bit effectively acts like an enable/disable bit.

Por ARTRAG

Enlighted (6932)

Imagen del ARTRAG

01-08-2016, 20:53

Thanks! Yes it was for that.
I'm having problems with volume encoding
What is the rule in linear ratios of the max level?

I was thinking to map the Keyon bit as corresponding to value 15 of volumes, provided that 15 is just a strong attenuation but it is not mute.
Maybe I should map volumes on 17 levels and use the 17th level as mute

Anyway my error is in the way I used to convert volumes.
I used linear volumes but it is not correct

I will try this
Reg30= - 20 log10( volume/vmax )/45 *15

Por ARTRAG

Enlighted (6932)

Imagen del ARTRAG

01-08-2016, 20:31

Anything bigger that 15 will be mapped in keyon =0

Por ARTRAG

Enlighted (6932)

Imagen del ARTRAG

01-08-2016, 23:44

the new formula works much better
new files here

Por sd_snatcher

Prophet (3645)

Imagen del sd_snatcher

03-08-2016, 02:11

Quote:

Actually 15 is not MUTE, just very low.

This happens because internally the YM2413 has an OPL2 core that has a 5bit volume control. This means you can't reset the lowest bit of the volume directly.

But the key off can help you with that as mentioned here. But you might have to set the decay rate to the fastest rate as possible.

Página 2/2
1 |