ChanServ changed the topic of ##yamahasynths to: Channel dedicated to questions and discussion of Yamaha FM Synthesizer internals and corresponding REing. Discussion of synthesis methods similar to the Yamaha line of chips, Sound Blasters + clones, PCM chips like RF5C68, and CD theory of operation are also on-topic. Channel logs: https://freenode.irclog.whitequark.org/~h~yamahasynths
Xyz_39808 has quit [Ping timeout: 260 seconds]
<Lord_Nightmare> Foone: disregard. I see you already have it covered.
<KillaMaaki2> Oh, wait.... just realized the log-sin table actually stores 1/sin. If I use ((mantissa/1024) * pow(2, exponent)) (not inverting the exponent's sign), I do get a very close approximation to the 1/sin value... I see...
Xyz_39808 has joined ##yamahasynths
<KillaMaaki2> Oh I think I get it. Guessing it stores log2(1/sin) so that the sign bit is implicit and reduces number of bits that are required in hardware? But I'm just emulating so I can probably just go ahead and store log2(sin) instead and not worry about that.
<andlabs> log2(1/sin) = log2(1)-log2(sin) = -log2(sin)
<andlabs> not sure how this would even be noticeable
<andlabs> if the sign bit is dropped then it would simply look like a log2(sin) table
<andlabs> unless this is not using sign-magnitude based floating point numbers
<andlabs> whatever this is
<andlabs> YM3812
<whitequark> are we talking about ROM? or the DAC output?
<whitequark> iirc the DAC output format of YM3812 is hideously misdocuemnted
<andlabs> what is YM3812 again
<andlabs> OPL1 or OPL2?
<andlabs> also it would be cool if that image showed what a zero looked like
<andlabs> in the doc
<whitequark> opl2
<andlabs> ok
<whitequark> here are my notes
<andlabs> heh
<andlabs> afk
<KillaMaaki2> I'm mostly just trying to sorta emulate the table-centric math of the FM synth. I've been basically just trying to figure out how to interpret the output of the exp table for going from log back to linear. Think I've got it though now that I realize my sin table was actually storing 1/sin and I had my exp calculations correct all along haha
<KillaMaaki2> A little less concerned with the exact bit output, I was just using the DAC sheet to try and help me figure out the mantissa/exp math.
<KillaMaaki2> Frankly I don't know how I missed the 1/sin thing. Maybe I haven't had enough coffee.
<cr1901_modern> It took me 5 minutes to understand that DAC transfer function because I forgot what "+:" does in Verilog lol.
<Lord_Nightmare> yeah, that verilog function is completely escaping me
<whitequark> uhhh, i wrote the verilog one for clarity
<whitequark> looks like i achieved the exact opposite
<cr1901_modern> Lord_Nightmare: The mantissa is squashed between 7 bits of 0s and the opposite of the sign bit on each side, for 7+7+9 = 23 bits
<whitequark> ok, so, arrange in a line: 7 inverses of sign bit, mantissa, 7 zeroes, then imagine a window 15 bits wide that starts at the bit whose number is given by the exponent
<cr1901_modern> The exponent chooses 16 of those bits, which is then appended to the sign bit
<whitequark> and prepend the sign bit to it
<whitequark> yeah
<cr1901_modern> 15*
<Lord_Nightmare> so its ((sign<<15)|((~sign (repeated as 7 bits), mantissa (9 bits from M8 to M0), 7 '0' bits)<<(7-exponent))) ?
<Lord_Nightmare> or something like that, since the ~sign cannot overwrite the sign bit
<Lord_Nightmare> so you'd need to do &~sign before or-ing in the sign bit
<whitequark> yes
<whitequark> honestly, if i tried to write it in C in a foolproof way, i'd just make it manipulate strings
<whitequark> once the knowledge is transferred whoever needs it can optimize
<cr1901_modern> According to the 3012 datasheet, the DAC has a maximum amplitude of 1/2Vdd, a minimum amplitude of 1/2Vdd^-16, and "1/2Vdd" as the center (that last one is almost certainly a typo).
<cr1901_modern> It's not actually possible to generate exactly 1/2Vdd with the given equation either; the DAC equation in the Glasgow applet matches this behavior
<whitequark> reminds me that I still want to measure the response of the DAC to add lifelike distortion to the applet
<cr1901_modern> If/when you do that, you mind calculating the actual center, max, and minimum voltages? Since it is, well, a Yamaha datasheet, and I'm not sure which information is correct.
<whitequark> sure
<whitequark> i even have the DACs
<cr1901_modern> Tyvm. The given equation doesn't match what yamaha says the max or center amplitude is, even when correcting for the typo (center should be "1/4"): https://retrocdn.net/images/d/da/YM3012_datasheet.pdf
<cr1901_modern> (Equation on page 4. Unless I'm missing something, it's not possible to set Vout equal to either 1/2Vdd or 1/4Vdd with that equation due to the +2^-10)
<cr1901_modern> Oh damn, I misread the equation. 1/4 is indeed possible
<cr1901_modern> (D[9:0] = 1'b1000000000, E[2:0] = 7)
<cr1901_modern> E = 0*, bleh
<Lord_Nightmare> if Sign is S and ~sign is q, and mantissa m8 -m0 are zyxwvutsr, the 'field' is qqqqqqqzyxwvutsr0000000
<Lord_Nightmare> 7: [qqqqqqqzyxwvutsr]0000000, mask out highest bit and replace with S for Sqqqqqqzyxwvutsr
<Lord_Nightmare> so for exp of 7 thru 10
<Lord_Nightmare> 6: q[qqqqqqzyxwvutsr0]000000, mask out highest bit and replace with S for Sqqqqqzyxwvutsr0
<Lord_Nightmare> 5: qq[qqqqqzyxwvutsr00]00000, mask out highest bit and replace with S for Sqqqqzyxwvutsr00
<Lord_Nightmare> 4: qqq[qqqqzyxwvutsr000]0000, mask out highest bit and replace with S for Sqqqzyxwvutsr000
<Lord_Nightmare> 3: qqqq[qqqzyxwvutsr0000]000, mask out highest bit and replace with S for Sqqzyxwvutsr0000
<Lord_Nightmare> 2: qqqqq[qqzyxwvutsr00000]00, mask out highest bit and replace with S for Sqzyxwvutsr00000
<Lord_Nightmare> 1: qqqqqq[qzyxwvutsr000000]0, mask out highest bit and replace with S for Szyxwvutsr000000
<Lord_Nightmare> 0: qqqqqqq[zyxwvutsr0000000], mask out highest bit and replace with S for Syxwvutsr0000000 (which is unused since it destroys the high mantissa bit?)
linkmauve has quit [Ping timeout: 252 seconds]
<cr1901_modern> yes
<cr1901_modern> (Also, FWIW, the datasheet I linked does not mention a sign bit; it's 10-bit unsigned.)
<Lord_Nightmare> i might have the scale from 0-7 backwards
<whitequark> fyi i can easily record some raw samples for you
<Lord_Nightmare> and it would seem more likely to me for yamaha to have a case where the low bit of the mantissa ('r') is destroyed, than the high bit
<Lord_Nightmare> so i probably have exp backwards
<Lord_Nightmare> though maybe not
<cr1901_modern> whitequark: That would be nice. Let's see if I can remember the params for a sine wave...
<cr1901_modern> oh wait I'm a dumbass
<cr1901_modern> you can just feed the DAC a sine wave in the DAC format
<cr1901_modern> :P
<whitequark> i was thinking of recording YM3812 output
<whitequark> hooking up the DAC would be a lot of effort right now
* cr1901_modern nods
<cr1901_modern> I don't have good value for a test instrument for OPL offhand.
<whitequark> i had some i think
<whitequark> maybe in logs of this channel?
<whitequark> try searching them perhaps
Xyz39808 has joined ##yamahasynths
Xyz_39808 has quit [Ping timeout: 265 seconds]
Xyz_39809 has joined ##yamahasynths
<cr1901_modern> Couldn't find in during a quick grep, but I already made a patch in ADLMIDI. Just need to export it in a text format
Xyz39808 has quit [Ping timeout: 265 seconds]
<cr1901_modern> I admit I'm not that familiar w/ OPL(2), but the OPL2 manual says up to 9 channels of melody while there's only enough register space for 16 operators?
<cr1901_modern> (i.e. 8 channels)
Xyz39808 has joined ##yamahasynths
<cr1901_modern> Anyways, 2-operator mode, 0 feedback, AM connection. Operator 1 should be programmed with: 01 3f f0 ff 00 at addrs 20, 40, 60, 80, and E0 respectively. Operator 2: 01 00 f0 ff 00 at addrs 23, 43, 63, 83, and E3 respectively
<cr1901_modern> 0x3F is the volume, ranges from 0 to 3F/63
Xyz_39809 has quit [Ping timeout: 265 seconds]
Xyz39808 has quit [Ping timeout: 260 seconds]
Xyz_39808 has joined ##yamahasynths
Xyz_39808 has quit [Ping timeout: 265 seconds]
ZirconiumX has quit [Quit: Love you all~]
_whitelogger has joined ##yamahasynths
linkmauve has joined ##yamahasynths
ZirconiumX has joined ##yamahasynths
<cr1901_modern> fseidel: Masahiko Yoshimura shared this with me today. He wrote it in the 80s, and it is a combination of a bunch of FM synths. And WOW... it's really damn good: https://soundcloud.com/brainbrown/monologue
<superctr> <cr1901_modern> I admit I'm not that familiar w/ OPL(2), but the OPL2 manual says up to 9 channels of melody while there's only enough register space for 16 operators? <- OPL/OPL2 has 18 operators
<cr1901_modern> superctr: Oh, I figured out the problem. I can't count.
<cr1901_modern> F5 - E0 does _not_ equal 16
<cr1901_modern> err 15* ahh screw it
<cr1901_modern> Also, not only can I not count, I also can't subtract.
<cr1901_modern> Subtraction is still bullshit.
<andlabs> it equals 0x15
<andlabs> =P
<andlabs> and speaking of combination of FM synths, the CX5M has several different programs for building FM voices for several different FM synths...
<andlabs> I bet they are all incompatible too!
<cr1901_modern> Thanks andlabs, that's very helpful :)
<cr1901_modern> :P
<andlabs> we'll see if I get any of them
<cr1901_modern> I looked up CX127M and couldn't find anything
<andlabs> I have the one for the SFG-01 (YRM-102)
<andlabs> where did you get 127 from
<cr1901_modern> Musical instrument:YAMAHA DX7,TX816,CX127M,RX11,REV7,SPX90
<andlabs> oh
<andlabs> uhhh
<andlabs> I'm going to guess they meant CX7M
<andlabs> which is the japan-only ( >:( ) MSX2 successor to the computer I'm talking about
<andlabs> same sound module
<andlabs> CX7M/128
<andlabs> IDK for sure though, ask them
<cr1901_modern> Asking now
<cr1901_modern> REV7 is apparently a reverb machine. I don't know much about those.
<cr1901_modern> Sounds like they add reverb (whodathunk?). But on a channel-by-channel basis?
<cr1901_modern> andlabs: Indeed it's supposed to be CX7M/128
<cr1901_modern> Linked to this webpage: http://bubrhythm.net/Retorhythm/cx7m.html
brezza_dsa has joined ##yamahasynths
<andlabs> ok
<andlabs> yes, standalone effects processors are a thing
<andlabs> I have a Roland DEP-5
<andlabs> I would like an Ensoniq one at some point
<Sarayan> andlabs: gimme romz kthnx ;-) Effects are fun
<andlabs> ROMs for what
brezza_dsa has quit [Remote host closed the connection]
<fseidel> cr1901_modern: wow, that really is fantastic
<fseidel> I love the winter-ey feeling
<fseidel> reminds me a little bit of something off YMO's BGM.
<fseidel> Actually, he's got a few other YMO-sounding things, including a straight up cover of Mad Pierrot, so I guess that would explain it.
<fseidel> huh, his entire YT channel is YMO/Ryuichi Sakamoto covers: https://www.youtube.com/user/brainbrown
Xyz_39808 has joined ##yamahasynths
<cr1901_modern> fseidel: That sounds about right re: YMO covers :P. He comments on Shining Force vids and responds to comments about it on his channel.
<cr1901_modern> I do appreciate that he is receptive to fans of his previous work. AIUI, some ppl like Tim Follin didn't actually like composing video game soundtracks that much and left the industry completely.
<superctr> a few japanese composers left VGM as well
<superctr> yoko kanno, soyo oka for example
<cr1901_modern> Soyo Oka I knew about (love her work), Yoko Kanno I didn't know did video games at some point :o
<cr1901_modern> https://twitter.com/orangeislandok/status/1193151445228490752 Looks like a crowdfunded game got Soyo Oka out of retirement :3
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cr1901_modern> Sarayan: https://freenode.irclog.whitequark.org/~h~yamahasynths/2020-01-22#1579680404-1579680413; Yea, I overshot that deadline w/o much progress. I wonder if I move it back a month, if anything will change
Xyz_39808 has quit [Read error: Connection reset by peer]
Xyz_39808 has joined ##yamahasynths
<fseidel> I saw a panel with Takashi Tateishi at MAGFest 2019, and he apparently left VGM to do marketing
<fseidel> and his marketing career was longer than his VGM one
andlabs has joined ##yamahasynths
<cr1901_modern> Huh, interesting... does he still do music as a hobby? Yoshimura pivoted to programming/machine learning. Autotranslating his Twitter acct makes no reference to his composing
<cr1901_modern> Twitter acct description*
<fseidel> nah, he mentioned that he hadn't done anything musical in years
<cr1901_modern> Hm :(
<cr1901_modern> ANyways, I've been talking about Yoshimura a lot in this room, but his soundtracks definitely left an impression on me a 12-14 year old. I recorded music from Shining In The Darkness onto casette and listened to them on the way to school.
<cr1901_modern> So it's pretty surreal that he has an online presence and he's receptive to chatting about his previous work.
<fseidel> Yuzo Koshiro is super active online too
<fseidel> and apparently speaks English quite well: https://www.youtube.com/watch?v=tLqbixY5H0s
<cr1901_modern> I knew he was super active online... haven't gotten to talk to him yet! But wow that English is good