Author Topic: Question: Wave-phasing on the PC engine, how feasible is that?  (Read 8335 times)

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #15 on: December 20, 2016, 03:08:47 PM »
I have a vague idea on how to do that actually... Instead of composing my music on a single track/file I'd make it in two, one for the HuC6280 and the other for the ADPCM, so one track would have the regular 6 channels and the other just the one ADPCM with some drum samples (btw is the ADPCM capable of re-pitching samples? Just in case I wanna throw in some orch hits or something...)
And then in the hardware itself you make the two tracks play together! Or at least that's how I'd imagine it being done...

It can be done that way, but it doesn't sound like a lot of fun to create a tune that way.

"Yes", you can re-pitch samples ... but not in any musically-meaningful way.

The ADPCM hardware only supports the following playback rates ...

 2000 Hz
 2133 Hz
 2286 Hz
 2462 Hz
 2667 Hz
 2909 Hz
 3200 Hz
 3556 Hz
 4000 Hz
 4571 Hz
 5333 Hz
 6400 Hz
 8000 Hz
10667 HZ
16000 Hz



Quote
I've already done some songs that use 2 trackers or 2 instances of the same tracker, and even if you need MML, I've read in another thread in this forum that there are tools to convert MIDI into MML for the PC engine (I think you guys know which thread I'm talking about) and I can use OpenMPT to export MIDI! So it's all a matter of me remaking some song I've already done in Deflemask onto OpenMPT and then figuring out the rest with the MML tools, so I'd totally volunteer to do that!

Well, if you're willing to put up with the bleeding eyes and anal discomfort that go with MML, then things do get somewhat easier.

The biggest problem with the MIDI-to-MML route, is that you'll lose all of the effect information, and just get stripped back to basic note information.

Then you've got to recreate the effects tables in a text-editor and add the appropriate commands back into the MML in the appropriate places.

It can be done ... and it's how it all used to be done ... but it's not particularly "friendly", and it's a lot more work than most folks want to deal with these days.

If you want to go down the MIDI-to-MML path, then Arkhan and TheOldMan may be able to help out, or have suggestions on how to handle things within the Squirrel toolset and the System Card player.


Quote
Unless of course everything I just said is all a load of bollocks and it doesn't work like that... Please let me know...

Hahaha ... British yourself, or perhaps just British parents?  :wink:

Nope, what you propose is workable within the existing toolchain if Arkhan decides to try to update the system Card player to handle samples, and then maybe add ADPCM, too.

With a different sound driver, 7 channel OpenMPT-to-MIDI-to-3MLE is probably even easier.

It then becomes a question of defining the process needed to create tables (i.e. envelopes) for volume/vibrato/arpeggio/drum and all the other effects.

But ... an alternative idea might be to ask Delek to add a 7-channel variant to Deflemask, heck, that would be nice for the PC-FX too, although IIRC, I think that we've got 2 ADPCM channels on that console, and could use an 8-channel variant (it's got the same Hu6280 sound chip as the PCE).

Michirin9801

  • Hero Member
  • *****
  • Posts: 589
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #16 on: December 20, 2016, 03:51:21 PM »
I have a vague idea on how to do that actually... Instead of composing my music on a single track/file I'd make it in two, one for the HuC6280 and the other for the ADPCM, so one track would have the regular 6 channels and the other just the one ADPCM with some drum samples (btw is the ADPCM capable of re-pitching samples? Just in case I wanna throw in some orch hits or something...)
And then in the hardware itself you make the two tracks play together! Or at least that's how I'd imagine it being done...

It can be done that way, but it doesn't sound like a lot of fun to create a tune that way.

"Yes", you can re-pitch samples ... but not in any musically-meaningful way.

The ADPCM hardware only supports the following playback rates ...

 2000 Hz
 2133 Hz
 2286 Hz
 2462 Hz
 2667 Hz
 2909 Hz
 3200 Hz
 3556 Hz
 4000 Hz
 4571 Hz
 5333 Hz
 6400 Hz
 8000 Hz
10667 HZ
16000 Hz


Well, nothing is gonna be more fun than just using Deflemask, but then again if I'm gonna re-do stuff on OpenMPT I might as well do it the hard way...
Also, I guess no Orch Hits for me... It's fine though...

Well, if you're willing to put up with the bleeding eyes and anal discomfort that go with MML, then things do get somewhat easier.

The biggest problem with the MIDI-to-MML route, is that you'll lose all of the effect information, and just get stripped back to basic note information.

Then you've got to recreate the effects tables in a text-editor and add the appropriate commands back into the MML in the appropriate places.

It can be done ... and it's how it all used to be done ... but it's not particularly "friendly", and it's a lot more work than most folks want to deal with these days.

If you want to go down the MIDI-to-MML path, then Arkhan and TheOldMan may be able to help out, or have suggestions on how to handle things within the Squirrel toolset and the System Card player.

Well that changes things... It sure is gonna be harder and I don't know if I'll be able to get used to MML soon... We'll see...
(If I can't I hope you don't mind if I just send you a deflemask file or an openMPT file with the song data, whichever one you prefer)

Quote
Unless of course everything I just said is all a load of bollocks and it doesn't work like that... Please let me know...

Hahaha ... British yourself, or perhaps just British parents?  :wink:

Nope, what you propose is workable within the existing toolchain if Arkhan decides to try to update the system Card player to handle samples, and then maybe add ADPCM, too.

With a different sound driver, 7 channel OpenMPT-to-MIDI-to-3MLE is probably even easier.

It then becomes a question of defining the process needed to create tables (i.e. envelopes) for volume/vibrato/arpeggio/drum and all the other effects.

I hope that happens soon!

But ... an alternative idea might be to ask Delek to add a 7-channel variant to Deflemask, heck, that would be nice for the PC-FX too, although IIRC, I think that we've got 2 ADPCM channels on that console, and could use an 8-channel variant (it's got the same Hu6280 sound chip as the PCE).

Weeeelllllllllllllll... That's probably never gonna happen... (Or at least not anytime soon, unless they make the tracker open-source someday)
You see, when Delek adds a new system to the tracker he does a poll to decide which system should be the next one, and apparently the one most people want in the Deflemask Forum is the OPL2, but personally the ones I'm hoping for are the SPC-700 or the YM2203/YM2608...
By the time he's done with all of those then MAYBE he'd do the PC engine CD or the PC-FX, if at all...
But hey, who knows? It doesn't hurt to ask right?

ParanoiaDragon

  • Hero Member
  • *****
  • Posts: 4619
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #17 on: December 20, 2016, 06:23:41 PM »
Welcome to the boards! Another musician has been revealed! Hooray!

Can't wait to hear the responses to your query, good luck finding the answers you're seeking!

Indeed, we are in desperate need of chiptune artists!  I have nowhere near enough time to try to do chiptunes, only redbook with what limited time I do have, so I'm hoping for wonderful things from Michirin9801! :)

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #18 on: December 21, 2016, 05:52:26 AM »
Michirin9801:
Have you seen this trick before: http://www.pcedev.net/audio/sub_waveform6.xm

No I hadn't seen that, but I believe Legend of Xanadu 2's soundtrack does these effects a lot, which is why it sounds so ~BEAUTIFUL~
And I recognise these waveforms, they're from Ys IV aren't they? I have them all on Deflemask ;3
Also, the effect in Deflemask to make the instruments on different channels go out of phase like that is E5xx, I've been using it quite a bit recently!

 Falcom does phasing on those games, but it's different than I what I was talking about. It's just detune phasing form what I looked at. But yeah, Xanadu games sounds awesome - and fuller too. I don't remember where the samples came from - but it's from a hucard game. Probably stock waveforms that even the system card PSG player uses. R-type on the PCE has some really interesting samples, though you wouldn't know it just by hearing the sound track in the game. Check it out: http://www.pcedev.net/audio/R-type.xm
 
Related to the CPU popping issue, could you use two channels for sample waveform playback but have them on opposite ticks, one going off as the other goes on, and getting two samples played back while also eliminating the pop?

Unless you keep the alternate channel off the whole time - it won't solve the popping issue.

fragmare

  • Hero Member
  • *****
  • Posts: 676
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #19 on: December 21, 2016, 04:22:57 PM »
Loving that Kirby cover!  :)

Michirin9801

  • Hero Member
  • *****
  • Posts: 589
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #20 on: December 22, 2016, 05:23:32 AM »
Loving that Kirby cover!  :)
Glad you do ^^

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #21 on: December 22, 2016, 02:50:17 PM »
I don't know how much this will help, but if you have a PCE/Turbo flash cartridge, you can try out wave phasing* on real hardware easily enough using my never-finished PCE sound tool:


http://www.chrismcovell.com/data/PCMgine_b1.zip

In the top-right of the first image, you can see a "WF Cycle" function that ping-pongs between up to 7 different waveforms in memory at selectable speeds.  You can at least test things out this way.

*or a crude facsimile

Michirin9801

  • Hero Member
  • *****
  • Posts: 589
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #22 on: December 22, 2016, 03:15:14 PM »
I don't know how much this will help, but if you have a PCE/Turbo flash cartridge, you can try out wave phasing* on real hardware easily enough using my never-finished PCE sound tool:


http://www.chrismcovell.com/data/PCMgine_b1.zip

In the top-right of the first image, you can see a "WF Cycle" function that ping-pongs between up to 7 different waveforms in memory at selectable speeds.  You can at least test things out this way.

*or a crude facsimile


That's the tool you've used in your last video right?
It's a pretty good tool but I still don't have a real PC engine to use it on... But I'll get one eventually!
Also, the fact that this tool can even do that is already proof enough that it can be done in real hardware!

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #23 on: December 23, 2016, 09:39:02 AM »
You can do this in MML as we've mentioned before just by changing the waveforms in succession.

You'll just have to be careful while doing it, and it will probably look a little messy.   You could define notes as patterns though, and play the patterns instead of notes.  It's a bit cheating, but would let you not have to keep redoing work.

It would definitely be good for PWM'd lead sounds like the C64, without the arps.



I did this stuff with a bit of C64 in mind.  I made a sort of SID sounding lead with PC Engine flare.  I'm not doing any phasing though.   IIRC, it's two channels combined with a bit of detuning.   
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

Windcharger

  • Newbie
  • *
  • Posts: 44
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #24 on: December 23, 2016, 01:24:08 PM »
Hello everyone, I'm new here...

Hey!  I didn't know you were on the forums too...  Too cool, and welcome!   :D

Welcome to the boards! Another musician has been revealed! Hooray!

Indeed!  Seems like we're making some good and much needed PCE audio progress as of late!  whoo hoo!

Michirin9801

  • Hero Member
  • *****
  • Posts: 589
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #25 on: December 24, 2016, 12:55:02 PM »
You can do this in MML as we've mentioned before just by changing the waveforms in succession.

You'll just have to be careful while doing it, and it will probably look a little messy.   You could define notes as patterns though, and play the patterns instead of notes.  It's a bit cheating, but would let you not have to keep redoing work.

It would definitely be good for PWM'd lead sounds like the C64, without the arps.



I did this stuff with a bit of C64 in mind.  I made a sort of SID sounding lead with PC Engine flare.  I'm not doing any phasing though.   IIRC, it's two channels combined with a bit of detuning.


I would if I could but I don't know MML yet... I think I'll wait for elmer's DMF2PCE thing to be complete before I really dabble into it >w>

Also, the soundtrack is pretty good, but you'd get a better C64 effect if you used a sawtooth in one channel and a reverse-sawtooth in the other and play those two slightly out of phase...
Kinda like this:
Waves: http://orig15.deviantart.net/66ce/f/2016/359/d/d/capture_by_michirin9801-dasvy00.png
Result: http://orig05.deviantart.net/5abe/f/2016/359/9/0/pce64_test_by_michirin9801-dasvydc.wav


Hello everyone, I'm new here...


Hey!  I didn't know you were on the forums too...  Too cool, and welcome!   :D

Welcome to the boards! Another musician has been revealed! Hooray!


Indeed!  Seems like we're making some good and much needed PCE audio progress as of late!  whoo hoo!



Thank you very much ^^

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #26 on: December 24, 2016, 01:39:51 PM »
Agreed.  I actually tried that, and felt that without the rest of things being as thick as a SID tends to be, it didnt quite feel right. 

What i went with was close and similar, with more of a pcengine charm.   

Since the pce is generally weaker in bassland, some things just dont sound right, lol.


Sent from my D6708 using Tapatalk

[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

Michirin9801

  • Hero Member
  • *****
  • Posts: 589
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #27 on: December 24, 2016, 02:57:59 PM »
Agreed.  I actually tried that, and felt that without the rest of things being as thick as a SID tends to be, it didnt quite feel right. 

What i went with was close and similar, with more of a pcengine charm.   

Since the pce is generally weaker in bassland, some things just dont sound right, lol.


Sent from my D6708 using Tapatalk
Well depends... Maybe you could also use 2 channels for the bass to make it thicker? Or maybe you could use a heavier wavetable like the one used for the bass in Devil's Crush, it's a pretty simple wave:
00 00 00 31 31 31 00 00 00 00 00 31 31 31 31 31 00 00 00 00 00 00 00 00 31 31 31 31 31 31 31 31
But hoo boy does it sound powerful!

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #28 on: December 24, 2016, 04:50:23 PM »
Yeah.   Its powerful but still not as thick as a c64 can get out of a pwmd bass with those 6581 filters.   The thing is essentially a real analog synth.   I prefer the pce anyways, but wont even try pretending it can do some of that.   I got arps to work though!  And remembered why i dont like using them.  \(☆o☆)/  pce seems really good for plucked bass sounds, though.   


Anyway, the bigger problem is that it goes in a game, so you have to contend with pewpew and explodey noises.

Thats why I ended up leaning more towards a more typicalish pce setup for the song.   

The sid will always be better at certain things.

... but then its only three channel, and games tend to suck at sfx, and often just shrug em off in favor of music, lol.


Anyway, getting all these sorts of things to work is definitely doable.    Either with one or two channels.

Im of the opinion that vying for sid style stuff isnt a great idea though.   Leave that to cd tracks, or a c64 .     Pce has its own unique charm that the sid cant deal with.

But, using the idea for the little worbly steeldrummy effects its definitely worth doing.




Sent from my D6708 using Tapatalk

[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

Michirin9801

  • Hero Member
  • *****
  • Posts: 589
Re: Question: Wave-phasing on the PC engine, how feasible is that?
« Reply #29 on: January 06, 2017, 01:31:03 PM »
So, about that popping sound, I've just started using Mednafen because you guys seem to agree that it's the more accurate PC engine emulator out there (although I've been using Wii Mednafen for a while, which btw is MUCH more user-friendly to my experience) and I've loaded up some .hes exports from Deflemask, and I came out with 2 impressions:
1 - Mednafen runs Deflemask's .hes exports much better than pretty much anything else I've used thus far...
2 - Yeah, I can definitely hear the popping sound you've mentioned, but how bad it sounds depends a lot on the pitch of the note and the instrument being used, for example, in higher pitched notes the popping is much less noticeable than in lower pitched notes, and instruments that change the wavetable more quickly and/or fewer times sound much better than instruments that change the wavetable more slowly and/or more times...

Here's a few examples of what I've attempted to do with this trick (all of which are WIPs):http://orig11.deviantart.net/b1f0/f/2017/006/e/2/puyo_pop_mednafen_by_michirin9801-dauhme2.mp3

^This one sounds fairly close on Mednafen to what it sounds like in Deflemask, the steel drums have little-to-no popping, but the trumpets have some noticeable popping going on, but it's not that bad, or at least I don't think so... I think the reason why this song works is because all of the wave-phasing instruments are higher-pitched and change the wavetable pretty quickly, the trumpet only really sounds worse because it changes the wavetables very often, meanwhile the bass is just a pulse...
http://orig04.deviantart.net/6bbf/f/2017/006/3/b/pce64_test_mednafen_by_michirin9801-dauhojb.mp3

^This little thing I've made a while back uses wave-phasing just to do C64 style pulse length modulation, and it's only in the higher pitched lead, the bass is just a sawtooth, and as you can hear this one has no popping at all, so for the pulse length modulation wave-phasing is fair game right? Well...
http://orig07.deviantart.net/d71c/f/2017/006/0/8/shape___artillery_wip_mednafen_by_michirin9801-dauhpi7.mp3

^As you can hear in this WIP, not really... It's good for the higher-pitched notes, but if you put it in the lower pitches it sounds kinda crappy, the popping is very noticeable...
http://orig13.deviantart.net/0416/f/2017/006/5/e/dqv_castle_wip_mednafen_by_michirin9801-dauhqcb.mp3

^And then I've decided to do some more complicated wave-phasing on every single instrument on every single channel for this one, and as you can hear, it sounds rubbish... Hardly any of the instruments sound any good, maybe a string here and there but that's about it...

So, after these experiments I've concluded that this trick is only really worthwhile for Steel Drums and Pulse Length Modulation on higher-pitched notes... Other than that, the only wave-phased instruments I've managed to get sounding good were some wave-phased drums like toms, kicks and a surprisingly good harp, but I don't have any examples to show them in action at the moment... Maybe someday I'll find/make other instruments that sound good with this trick, but it has to be kinda like the steel drum, where it's on the higher-pitched end and doesn't change the wavetables a whole lot...
« Last Edit: January 06, 2017, 01:34:21 PM by Michirin9801 »