@GTV reviews the Cosmic Fantasy 1-2 Switch collection by Edia, provides examples of the poor English editing/localization work. It's much worse for CF1. Rated "D" for disappointment, finding that TurboGrafx CF2 is better & while CF1's the real draw, Edia screwed it up...
Main Menu

Merry Christmas and... the LFO: can anything musical be done with it???

Started by ccovell, 12/26/2014, 12:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ccovell

Hey, folks.  I know the PCE's LFO (so-called "FM") can create some weird warbling and growling sound effects... but can it actually make anything harmonic resembling an instrument?

Anybody have any LFO settings that approach anything musical?

I did a few more simple tests with the LFO and have some updated technical info about it (contradicting the PSG docs in HuC/MagicKit)

First off, when $0809 (LFO trigger) bit 7 is high, the LFO is activated, and waveform data for channel 1 act as values to add/subtract from channel 0's frequency register.  Whenever any byte in the waveform data is $10, there is no change to the frequency.  When the bytes are $11 to $1F, the frequency reg for channel 0 has $01 to $0F added to it (lowering the pitch).  When the waveform bytes are $0F to $00, the frequency reg for channel 0 has $01 to $10 subtracted from it (raising the pitch).  Thus, if you have a flat waveform of any value in channel 1, you can linearly raise/lower the frequency of channel 0 through the LFO.

Bits 0 and 1 of $0809 scale the waveform amount by 0,1,4, and 16  (not 16 and 256 as in the MagicKit docs.)  Thus if you set the frequency reg in channel 0 to $140, the waveform in channel 1 to all $0Fs, and the LFO is set to 1x scaling, the resultant frequency coming out of channel 0 would be the same as if it had been set to $13F.  If you set the scale factor to 4x, then the resultant frequency of channel 0 would be $13C.  ($140 - $04 = $13C).  Likewise, if you use the 16x scale setting, the resultant frequency would be $130  ($140 - $10 = $130).

Therefore, with the waveform range of $00 to $1F, and the scaling factors, here is the maximum range the output frequency of channel 0 can be changed:

 1x: -$ 10 <-----> +$ F
 4x: -$ 40 <-----> +$3C
16x: -$100 <-----> +$F0


Now the problem is that the frequency register is simply being changed, and not the actual output frequency, thus the modulation that comes out is different for different notes/octaves, and thus totally nonharmonic, as well as the fact that the modulation blindly causes register wraparounds (ie: $030 - $100 = $F30, a very low note), with more problems besides...

Also, I've played with the LFO frequency (with channel 1 frequency) settings while watching an oscilloscope, and although it can create faster and faster vibrato, it never seems to create overtones that shape channel 0's waveform like (I imagine) true FM would.  Worse, at the fastest possible frequencies, the LFO seems to give up as well, meaning its frequency (countdown) timers stay reset at some level, applying a constant modulation value (rather than ultra-fast modulation).

So that's that.  Anybody got any good use out of the LFO?

ccovell

Unfortunately, the frequency analyzer in my osci is not so good.... it takes steps of about 5-7 Hz when frequencies are below 50hz.

However, if you pair two or three channels together, with the same waveform (a 90% duty cycle pulse wave, for example) and with close frequencies (eg: $F00, $F01, $F02) their interference patterns will help add some rumble.

All this time, tho, there will be a bit of high-frequency aliasing because of the stairstep behaviour of all the PCE's waveforms.  Too bad we can't do anything about that, besides a low-pass filter.

(You can test this all out here: https://www.pcengine-fx.com/forums/index.php?topic=11401.msg220803#msg220803 )

Arkhan Asylum

I might have an MML file laying around with some LFO settings in it from Squirrel that sounded cool.

I'd have to dig around for it though.
This "max-level forum psycho" (:lol:) destroyed TWO PC Engine groups in rage: one by Aaron Lambert on Facebook "Because Chris 'Shadowland' Runyon!," then the other by Aaron Nanto "Because Le NightWolve!" Him and PCE Aarons don't have a good track record together... Both times he blamed the Aarons in a "Look-what-you-made-us-do?!" manner, never himself nor his deranged, destructive, toxic turbo troll gang!

spenoza

I would like to hear some samples of this effect to illustrate it.

TurboXray

Yeah, magickit description has some errors, as well as other older docs. I did LFO testing with rypheca and exodus as few years ago and found some interesting things, but nothing that made notes like traditional FM. I was able to make some high frequency sound effects with it, but other than that - it's useless. It's useless as LFO, because you can change the PCE's period registers without artifacts that other older audio chips had at the time (nes and sms come to mind).

 IIRC, the modulating channel will also 'audio' leak to the DAC if the volume isn't set to zero. I also had a bug where if I didn't initialize ALL sound registers, that the waveform data from the modulation channel would be applied as square waves (regardless of what was written to it). I never isolated the problem, because it was random at boot up (not a usable exploit). Initializing every sound register fixed it.

 Edit: Found this info I had from a while back
Quote_ D1-0: These are the FM data multipliers. They are: $00=Off, $01=0.5x, $02=4x, $03=16x.
I tested this by applying the settings, recording from the system, and then checking against a frequency analyzer.

 Also, this:
QuoteChannel 1 will output the waveform data as normal sound in LFO mode. You can also write to channel 1's data port and replace the waveform memory as it's playing. Just like with other channels. It's unclear if the new data written on the port effects the frequency modulation right away, either. This still needs to be tested. But I do know that the sound will be heard if channel 1's volume is high enough
Just like with any normal channel, if you write to the DDA port while the channel is 'playing' - it will transfer that written value into the channel's ram at the current playback pointer (this is used as an effect by a few games). The same applies for when the channel is in modulation mode.

elmer

ccovel & Bonkuts ...

Yes, it's a documentation error in MagicKit. The official PSG manual confirms what you're saying.

Just for laughs ... the description of bit 7 ... the LF TRG bit is ...

Writing "1" to the LF TRG bit (MSB) causes the LFO reset and initialization. And modulation is halted with modulation data from address "0" of waveform register of ch2. Wave counter is also reset to 0.

AFAIK it's not there for FM ... it's purely for producing a "vibrato" effect, at least that's how the musicians that I've worked with used similar hardware on other machines.

BTW ... I've followed both of your explorations for years now ... thank you. The PCE is one of the few systems that I haven't worked on, and your efforts are part of the body of work that may finally make it possible to rectify that.

ccovell

Happy new year!

Quote from: TurboXray on 12/30/2014, 04:33 PMEdit: Found this info I had from a while back
Quote_ D1-0: These are the FM data multipliers. They are: $00=Off, $01=0.5x, $02=4x, $03=16x.
I tested this by applying the settings, recording from the system, and then checking against a frequency analyzer.
I don't think this is accurate.  If you set another channel to the same waveform type and a near frequency, you can get a far more accurate way of judging what the modulated frequency is, by changing the other channel's frequency until they are exactly in phase.

That's how I tested the resultant frequencies, with my ears and an oscilloscope.  From this I found the multiplier for $01 was 1x.

In my experience, FFTs and analyzers aren't accurate down to the Hertz.

elmer

Happy New Year. You're right again, Chris ...

The manual says 0=off, 1=0-bit shift, 2=2-bit shift left, 3=4-bit shift left.

Psycho Punch

This Toxic Turbo Turd/Troll & Clone Warrior calls himself "Burning Fight!!" on Neo-Geo.com
For a good time, reach out to: aleffrenan94@gmail.com or punchballmariobros@gmail.com
Like DildoKobold, dildos are provided free of charge, no need to bring your own! :lol:
He also ran scripts to steal/clone this forum which blew up the error logs! I had to delete THOUSANDS of errors cause of this nutcase!
how_to_spell_ys_sign_origin_ver.webp

elmer

You do realize that all the LFO information, and all the interesting video register settings too, are shown in Hudson Soft's patent filings that have been made available on Archaic Pixels within the last year or so?

Psycho Punch

Actually no, I didn't. But it would sitll be interesting to see an official document for the PCE/Turbo if you're interested in sharing the manual. If not no big deal.
This Toxic Turbo Turd/Troll & Clone Warrior calls himself "Burning Fight!!" on Neo-Geo.com
For a good time, reach out to: aleffrenan94@gmail.com or punchballmariobros@gmail.com
Like DildoKobold, dildos are provided free of charge, no need to bring your own! :lol:
He also ran scripts to steal/clone this forum which blew up the error logs! I had to delete THOUSANDS of errors cause of this nutcase!
how_to_spell_ys_sign_origin_ver.webp