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
<fseidel>
cr1901_modern: looks dead simple, uses none of the E* effects
<fseidel>
cr1901_modern: looks dead simple, uses none of the E* effects
<fseidel>
cr1901_modern: looks dead simple, uses none of the E* effects
<fseidel>
just portamento, vibrato, volume, and volume slide
<fseidel>
just portamento, vibrato, volume, and volume slide
<fseidel>
just portamento, vibrato, volume, and volume slide
<fseidel>
plus a few 0xy arp commands
<fseidel>
plus a few 0xy arp commands
<fseidel>
plus a few 0xy arp commands
<fseidel>
superctr: that one is a lot of fun, but funnily enough doesn't require emulation of the Protracker "end of pattern jump" bug
<fseidel>
superctr: that one is a lot of fun, but funnily enough doesn't require emulation of the Protracker "end of pattern jump" bug
<fseidel>
superctr: that one is a lot of fun, but funnily enough doesn't require emulation of the Protracker "end of pattern jump" bug
<fseidel>
there's a few MODs that need that bug to be present to work properly, I think the music for "Hardwired" does.
<fseidel>
there's a few MODs that need that bug to be present to work properly, I think the music for "Hardwired" does.
<fseidel>
there's a few MODs that need that bug to be present to work properly, I think the music for "Hardwired" does.
<fseidel>
a lot of stuff by Emax uses the "EFx" command I mentioned previously, which performs a bitwise complement of the sample data at various offsets based on a table
<fseidel>
a lot of stuff by Emax uses the "EFx" command I mentioned previously, which performs a bitwise complement of the sample data at various offsets based on a table
<fseidel>
a lot of stuff by Emax uses the "EFx" command I mentioned previously, which performs a bitwise complement of the sample data at various offsets based on a table
<fseidel>
supposedly there's _really_ old Amiga trackers that have a different behavior called "funkrepeat" but I've never seen a .MOD expecting this
<fseidel>
supposedly there's _really_ old Amiga trackers that have a different behavior called "funkrepeat" but I've never seen a .MOD expecting this
<fseidel>
supposedly there's _really_ old Amiga trackers that have a different behavior called "funkrepeat" but I've never seen a .MOD expecting this
<cr1901_modern>
fseidel: Thank you. Been thinking about making a MOD player that only plays this MOD :P
<cr1901_modern>
fseidel: Thank you. Been thinking about making a MOD player that only plays this MOD :P
<cr1901_modern>
fseidel: Thank you. Been thinking about making a MOD player that only plays this MOD :P
<cr1901_modern>
Which'll probably be a PITA enough
<cr1901_modern>
Which'll probably be a PITA enough
<cr1901_modern>
Which'll probably be a PITA enough
<cr1901_modern>
fseidel: So if I'm reading this right, a MOD file can have up to 64 different patterns, and up to 128 patterns played before the song ends?
<cr1901_modern>
fseidel: So if I'm reading this right, a MOD file can have up to 64 different patterns, and up to 128 patterns played before the song ends?
<cr1901_modern>
fseidel: So if I'm reading this right, a MOD file can have up to 64 different patterns, and up to 128 patterns played before the song ends?
<cr1901_modern>
Famous last words: "This doesn't look so bad"
<cr1901_modern>
Famous last words: "This doesn't look so bad"
<cr1901_modern>
Famous last words: "This doesn't look so bad"
<fseidel>
the format itself is easy to parse, but consider the following, notes are stored as clock frequencies to write to Paula
<fseidel>
the format itself is easy to parse, but consider the following, notes are stored as clock frequencies to write to Paula
<fseidel>
the format itself is easy to parse, but consider the following, notes are stored as clock frequencies to write to Paula
<fseidel>
so why are arps in semitones
<fseidel>
so why are arps in semitones
<fseidel>
so why are arps in semitones
<cr1901_modern>
I haven't looked it up yet, but are the appregio/vibrato/etc commands that Paula knows how to interpret that MOD players on other systems have to do in software?
<cr1901_modern>
I haven't looked it up yet, but are the appregio/vibrato/etc commands that Paula knows how to interpret that MOD players on other systems have to do in software?
<cr1901_modern>
I haven't looked it up yet, but are the appregio/vibrato/etc commands that Paula knows how to interpret that MOD players on other systems have to do in software?
<fseidel>
and by the same train of thought... why waste all that space storing full periods for every note when you could just store a pitch value and index a note table, which would also mean that you wouldn't have PAL/NTSC-specific modules
<fseidel>
and by the same train of thought... why waste all that space storing full periods for every note when you could just store a pitch value and index a note table, which would also mean that you wouldn't have PAL/NTSC-specific modules
<fseidel>
and by the same train of thought... why waste all that space storing full periods for every note when you could just store a pitch value and index a note table, which would also mean that you wouldn't have PAL/NTSC-specific modules
<fseidel>
the commands just modify the pitch values written to Paula, Paula itself can't do any effects
<fseidel>
the commands just modify the pitch values written to Paula, Paula itself can't do any effects
<fseidel>
the commands just modify the pitch values written to Paula, Paula itself can't do any effects
<cr1901_modern>
Ahhh
<cr1901_modern>
Ahhh
<cr1901_modern>
Ahhh
<cr1901_modern>
Is Paula a glorified "divide the input samples by 4 and add them together" chip?
<cr1901_modern>
Is Paula a glorified "divide the input samples by 4 and add them together" chip?
<cr1901_modern>
Is Paula a glorified "divide the input samples by 4 and add them together" chip?
* cr1901_modern
is deliberately being reductive :P
* cr1901_modern
is deliberately being reductive :P
* cr1901_modern
is deliberately being reductive :P
<fseidel>
pretty much. It's effectively just 4 really simple DMA channels fetching at variable rates
<fseidel>
pretty much. It's effectively just 4 really simple DMA channels fetching at variable rates
<fseidel>
pretty much. It's effectively just 4 really simple DMA channels fetching at variable rates
<fseidel>
the mixing is really funny, there are 65 volume levels, 0->0x40
<fseidel>
the mixing is really funny, there are 65 volume levels, 0->0x40
<fseidel>
the mixing is really funny, there are 65 volume levels, 0->0x40
<cr1901_modern>
I'm probably going to quickly regret this rabbit hole, but I'm exhausted lately and want something fun to motivate me
<cr1901_modern>
I'm probably going to quickly regret this rabbit hole, but I'm exhausted lately and want something fun to motivate me
<cr1901_modern>
I'm probably going to quickly regret this rabbit hole, but I'm exhausted lately and want something fun to motivate me
<fseidel>
BTW, most songs were written in Europe, so you almost always want PAL tunings.
<fseidel>
BTW, most songs were written in Europe, so you almost always want PAL tunings.
<fseidel>
BTW, most songs were written in Europe, so you almost always want PAL tunings.
<fseidel>
(again, storing notes as Paula periods was a _huge_ mistake)
<fseidel>
(again, storing notes as Paula periods was a _huge_ mistake)
<fseidel>
(again, storing notes as Paula periods was a _huge_ mistake)
<cr1901_modern>
1 Paula period == 1/Paula clk?
<cr1901_modern>
1 Paula period == 1/Paula clk?
<cr1901_modern>
1 Paula period == 1/Paula clk?
<cr1901_modern>
which of course is gonna be different between PAL and NTSC
<cr1901_modern>
which of course is gonna be different between PAL and NTSC
<cr1901_modern>
which of course is gonna be different between PAL and NTSC
<fseidel>
yeah
<fseidel>
yeah
<fseidel>
yeah
<andlabs>
paula period = paula clock * speed of paula ^ 2
<andlabs>
paula period = paula clock * speed of paula ^ 2
<andlabs>
paula period = paula clock * speed of paula ^ 2
<fseidel>
I guess I should say that the notes are encoded as the number of cycles between sample fetches
<fseidel>
I guess I should say that the notes are encoded as the number of cycles between sample fetches
<fseidel>
I guess I should say that the notes are encoded as the number of cycles between sample fetches
<fseidel>
if that makes sense
<fseidel>
if that makes sense
<fseidel>
if that makes sense
<cr1901_modern>
yes
<cr1901_modern>
yes
<cr1901_modern>
yes
<cr1901_modern>
(Assuming one sample takes one clk cycle)
<cr1901_modern>
(Assuming one sample takes one clk cycle)
<cr1901_modern>
(Assuming one sample takes one clk cycle)
<cr1901_modern>
toi fetch*
<cr1901_modern>
toi fetch*
<cr1901_modern>
toi fetch*
<cr1901_modern>
According to this document, what Paula actually does is:
<cr1901_modern>
According to this document, what Paula actually does is:
<cr1901_modern>
According to this document, what Paula actually does is:
<cr1901_modern>
* Fetch a sample from channel X
<cr1901_modern>
* Fetch a sample from channel X
<cr1901_modern>
* Fetch a sample from channel X
<cr1901_modern>
* Wait "n" periods
<cr1901_modern>
* Wait "n" periods
<cr1901_modern>
* Wait "n" periods
<cr1901_modern>
* Fetch a sample from channel (X + 1) % 4
<cr1901_modern>
* Fetch a sample from channel (X + 1) % 4
<cr1901_modern>
* Fetch a sample from channel (X + 1) % 4
<cr1901_modern>
and it's a square wave (0, 1 only)?!
<cr1901_modern>
and it's a square wave (0, 1 only)?!
<cr1901_modern>
and it's a square wave (0, 1 only)?!
<cr1901_modern>
Btw, whitequark, your IRClogger has decided to print msgs in triplicate
<cr1901_modern>
Btw, whitequark, your IRClogger has decided to print msgs in triplicate
<cr1901_modern>
Btw, whitequark, your IRClogger has decided to print msgs in triplicate
<andlabs>
which message are you highlighting
<andlabs>
which message are you highlighting
<andlabs>
which message are you highlighting
<andlabs>
I read all of those
<andlabs>
I read all of those
<andlabs>
I read all of those
<andlabs>
I'm asking what your underlying goal is
<andlabs>
I'm asking what your underlying goal is
<andlabs>
I'm asking what your underlying goal is
<andlabs>
or overarching goal, one of the two
<andlabs>
or overarching goal, one of the two
<andlabs>
or overarching goal, one of the two
<cr1901_modern>
I want to create a MOD player that plays only a specific MOD without taking a lot of time
<cr1901_modern>
I want to create a MOD player that plays only a specific MOD without taking a lot of time
<cr1901_modern>
I want to create a MOD player that plays only a specific MOD without taking a lot of time
<fseidel>
cr1901_modern: not sure where the square wave comes in, I thought it just shoved the sample into a DAC
<fseidel>
cr1901_modern: not sure where the square wave comes in, I thought it just shoved the sample into a DAC
<fseidel>
cr1901_modern: not sure where the square wave comes in, I thought it just shoved the sample into a DAC
<fseidel>
samples are 8-bit unsigned PCM IIRC
<fseidel>
samples are 8-bit unsigned PCM IIRC
<fseidel>
samples are 8-bit unsigned PCM IIRC
<cr1901_modern>
I might misunderstand the text file
<cr1901_modern>
I might misunderstand the text file
<cr1901_modern>
I might misunderstand the text file
<fseidel>
*signed
<fseidel>
*signed
<fseidel>
*signed
<cr1901_modern>
Paula only has two pins for output. It _looks_ like those pins will output 256 values between 0 and Vcc - 1/256?
<cr1901_modern>
Paula only has two pins for output. It _looks_ like those pins will output 256 values between 0 and Vcc - 1/256?
<cr1901_modern>
Paula only has two pins for output. It _looks_ like those pins will output 256 values between 0 and Vcc - 1/256?
<cr1901_modern>
(or 0 to Vcc, take your pick)
<cr1901_modern>
(or 0 to Vcc, take your pick)
<cr1901_modern>
(or 0 to Vcc, take your pick)
<fseidel>
I believe that's correct, 2 channels hard panned left, 2 hard panned right
<fseidel>
I believe that's correct, 2 channels hard panned left, 2 hard panned right
<fseidel>
I believe that's correct, 2 channels hard panned left, 2 hard panned right
<fseidel>
and volume is linear
<fseidel>
and volume is linear
<fseidel>
and volume is linear
<cr1901_modern>
fwiw, the sauron mod I linked has one channel that's on both left/right
<cr1901_modern>
fwiw, the sauron mod I linked has one channel that's on both left/right
<cr1901_modern>
fwiw, the sauron mod I linked has one channel that's on both left/right
<fseidel>
Paula has no SW panning support
<fseidel>
Paula has no SW panning support
<fseidel>
Paula has no SW panning support
<fseidel>
if the MOD uses 8xy to set panning, it's targeting a PC tracker, or a later Amiga one using SW mixing
<fseidel>
if the MOD uses 8xy to set panning, it's targeting a PC tracker, or a later Amiga one using SW mixing
<fseidel>
if the MOD uses 8xy to set panning, it's targeting a PC tracker, or a later Amiga one using SW mixing
<fseidel>
I didn't see any of that on the Sauron mod, pretty sure it just has 2 hardware channels playing something similar
<fseidel>
I didn't see any of that on the Sauron mod, pretty sure it just has 2 hardware channels playing something similar
<fseidel>
I didn't see any of that on the Sauron mod, pretty sure it just has 2 hardware channels playing something similar
<cr1901_modern>
so Paula, at any given time, can only play 2 samples on one line?
<cr1901_modern>
so Paula, at any given time, can only play 2 samples on one line?
<cr1901_modern>
so Paula, at any given time, can only play 2 samples on one line?
<fseidel>
correct.
<fseidel>
correct.
<fseidel>
correct.
<cr1901_modern>
Because both the YT video and VLC, I can hear 3 samples at once on both left/right, although one channel is noticeably quieter than the other for each sample
<cr1901_modern>
Because both the YT video and VLC, I can hear 3 samples at once on both left/right, although one channel is noticeably quieter than the other for each sample
<cr1901_modern>
Because both the YT video and VLC, I can hear 3 samples at once on both left/right, although one channel is noticeably quieter than the other for each sample
<fseidel>
the YT video may have applied stereo mixing to make it sound better via headphones
<fseidel>
the YT video may have applied stereo mixing to make it sound better via headphones
<fseidel>
the YT video may have applied stereo mixing to make it sound better via headphones
<fseidel>
a lot of Amiga music sounds pretty bad through headphones unless you mix across left and right.
<fseidel>
a lot of Amiga music sounds pretty bad through headphones unless you mix across left and right.
<fseidel>
a lot of Amiga music sounds pretty bad through headphones unless you mix across left and right.
_whitelogger_ has quit [Remote host closed the connection]
_whitelogger__ has quit [Remote host closed the connection]
<whitequark[m]>
cr1901_modern: fixed
<cr1901_modern>
Haha nice
<fseidel>
if you want to hear what it sounds like on a real Amiga, consider this very accurate reproduction of the original ProTracker 2: https://16-bits.org/pt2.php
<cr1901_modern>
Is there a simple algorithm for stereo mixing?
<fseidel>
IIRC a classic is mixing 1/3 of the left into the right, and vice versa
<cr1901_modern>
works for me lmao
<cr1901_modern>
Uhh, I can still hear all 4 channels across both l/r on my headphones even w/ that clone :P
<fseidel>
huh, then it's probably just clever samples
<andlabs>
there were Amiga sound cards as well
<andlabs>
not sure what those entailed
<fseidel>
some of the better mods out there will swap samples between channels, or carefully arrange pre-mixed samples so you hear the same things on both L and R
<andlabs>
*is watching one on ebay*
<andlabs>
also
<andlabs>
Pietro Gagliardi, [16.03.21 23:34] anyway back to saving auctions I missed
<andlabs>
Pietro Gagliardi, [16.03.21 23:34] this time a bunch of motorola docs
<fseidel>
the title music uses a 7-channel music playback routine by Jochen Hippel, 3 hardware channels, plus 4 software channels played back on the remaining hardware one
<andlabs>
anyway Commodore numbered the audio channels 0, 1, 2, and 3
<cr1901_modern>
left, right, right, left
<andlabs>
the register list doesn't actually say what the difference is but they are in that order inthe memory map
<andlabs>
trying to find where in the documentation text they are
<cr1901_modern>
they still can't count
<cr1901_modern>
fseidel: Btw, IMO it sounds fine w/ hard panning and headphones
<andlabs>
oh Chapter 5
<andlabs>
I somehow missed it
<andlabs>
"This chapter is not a tutorial on computer sound synthesis; a thorough description of creating sound on a computer would require a far longer document. The purpose here is to point the way and show you how to use the Amiga's features. Computer sound pro- duction is fun but complex, and it usually requires a great deal of trial and error on the part of the user-you use the instructions to create some sound and play it back,
<andlabs>
read- just the parameters and play it again, and so on."
<andlabs>
(and then they say "read two books if you want to learn the Theory"
<andlabs>
)
<cr1901_modern>
spot the lie
<andlabs>
and there we go
<andlabs>
page 136
<andlabs>
DECIDING WHICH CHANNEL TO USE
<andlabs>
The Amiga has four audio channels. Channels 0 and 3 are connected to the left-side stereo output jack. Channels 1 and 2 are connected to the right-side output jack. Select a channel on the side from which the output is to appear.
<andlabs>
(that's the entirety of the section)
<cr1901_modern>
I took 3 years of "the harmonic style of 18th century european musicians"- err music theory. I'm still not great at making music
<cr1901_modern>
(Btw, if you look up the quoted- it came from a great video)
<andlabs>
not music theory, the theory of computer audio, but yes exactly lol
<andlabs>
is that the guy that made a vidoe about playing music at 432 hz
<cr1901_modern>
yes
<andlabs>
lol
<andlabs>
I'm amazed that people take that so seriously that there's dedicated software for it
<andlabs>
we agreed on 440 over the past 100 years *to avoid this exact fistfight*
<andlabs>
(and yeah 440 is a recent consensus)
<cr1901_modern>
This is a channel that's dedicated to making sure the bit patterns coming out of emulators match a 35+ year old sound chip. I'm not surprised at all ppl take it seriously.
<andlabs>
heh
<andlabs>
fair
<andlabs>
and it's likely the more accurate we get the further from exact 440 we get
<andlabs>
anyway if you want to know the exact reason they numbered the channels the way they did, IDK
<cr1901_modern>
One of smalin's old music visualizations of Canon In D, sounds closer to C# by modern standards
<cr1901_modern>
But apparently that's what "D" was agreed to be back then
<andlabs>
I'm not sure it'd take any fewer transitors
<fseidel>
seems like Glenn Keller is still alive, if you want to ask him why the channel numbers are the way they are...
<cr1901_modern>
Yea I saw his linked in
<cr1901_modern>
I don't use linked in
<andlabs>
there's probably an explanation
<andlabs>
the yamaha numbering has an explanation
<cr1901_modern>
And it seems inappropriate to dust off my acct just to cold ask him
<cr1901_modern>
andlabs: They can't count? :)
<andlabs>
(it has to do with the modulator/carrier approach to FM and extneding 2 operators to 4)
<andlabs>
(see also algorithm 4)
<cr1901_modern>
Ken Shirrif has an article on "why is the z80 data line pinouts numbering so screwed up"? Might be relevant to Amiga
<andlabs>
1 3 2 4 makes sense when you think of it as modulator modulator carrier carrier
<andlabs>
and I guess something about their operator design made it more desirable to keep the modulators together?
<cr1901_modern>
On page 135, it's mentioned that each channel has its own DAC
<cr1901_modern>
From reading the manual... 124 (in NTSC mode) is the minimum period you can write to Paula for DMA to work reliably. But the MOD info I'm looking at has a table going down to 113. Wheee
<cr1901_modern>
(PAL's minimum appears to 123)
<cr1901_modern>
Ahhh well, a mystery for another day
<fseidel>
I've never seen a MOD use periods that low, but if one did, you'd get weird distortion due to Paula being unable to fetch samples fast enough
<fseidel>
I believe the term the Amiga people use is "fetch starvation" or something
<fseidel>
the plot thickens: the limit is different per channel :-/
<andlabs>
what's the giant silkscreen circle right next to the mounting bracket for?
<andlabs>
that just has one component and tw otraces inside
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andlabs has joined ##yamahasynths
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andlabs has joined ##yamahasynths
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andlabs has joined ##yamahasynths
<cr1901_modern>
fseidel: Paula appears to be a "deceptively simple but still fucked up" chip ._.
<cr1901_modern>
I wish the Amiga tech manual went into more detail about why the max sampling rate is actually 28KHz rather than the theoretical 31KHz. But no, they handwave it away for brevity :(.
<superctr>
not enough dma bandwidth i assume
<cr1901_modern>
The manual says "it's for bufferring", whatever that means
<superctr>
due to the amiga's hardware arcitecture, each channel gets its "DMA slot" and will buffer evenever the slot is up
<superctr>
also, the reason for buffering is that the DMA slot doesn't always correspond exactly to the requested sample rate
<superctr>
commodore's designers were smart enough to realize that for example jittering is undesirable for sound playback
<cr1901_modern>
I seem to vaguely recall seeing something about that near the end of the chapter (where I started to not read closely)
<cr1901_modern>
The manual makes programming the chip as easy as it probably can possibly be. I just want more information b/c I don't like magic constants :P
<superctr>
for more information you probably need a pretty good understanding of how the amiga's dma architecture works
<cr1901_modern>
That is more time than I'm willing to put in right now, I'm afraid
linkmauve has left ##yamahasynths [##yamahasynths]
<superctr>
i did some basic checking: the theoretical max would be (7159090 * (4/226) / 4 = 31677) (using NTSC frequencies). this since it's known that audio uses 4 dma slots per scanline
<superctr>
but as it turns out it isn't stable above ~28.8 khz
<superctr>
maybe it's because the timings are different during vblank or something. or it's some internal quirk in the paula