Author Topic: PCE PCM  (Read 10680 times)

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: PCE PCM
« Reply #15 on: December 12, 2016, 06:09:39 PM »
Continued on from the MML thread in order to stop Arkhan from getting unhappy ...

It's not really me getting unhappy.  It's the thread being 50+% non-MML discussion that will cause people looking for MML to lose interest in as they sift through the walls of text and technobabble that they don't want to read because MML/music making and balls deep engine code are not really samey.

[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.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: PCE PCM
« Reply #16 on: December 12, 2016, 06:15:41 PM »
Actually, I have no idea which IRQ has higher priority.. VDC or TIRQ. Anyway, whatever. Lets assume TIRQ has high priority on the CPU and gets called first.
... Yeah, that works out pretty decent. Nevermind.

The order is ... RESET > NMI > BRK > TIMER > IRQ1 > IRQ2.

I have no idea why Hudson decided that "TIMER > IRQ1", but the cli at the start of the timer handler lets the hsync take priority, if it's already queued-up.  :wink:

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: PCE PCM
« Reply #17 on: December 14, 2016, 12:54:21 PM »
But what I was going to tell you, is that you can leave the channel in waveform mode and write to it like it was DDA. If you set the channel frequency really close to your TIRQ output, you can get weird overlay type of effects. Depending on the sample itself, it can sound interesting or not. I don't have a video to show though.

 Or, if you did an 8bit phase accumulator (overflow increments pointer) on a 32byte waveform in memory, you would do rough timing to 'distort' a single channel's instrument waveform over time - giving somewhat predictable timbre changing effects.

Those are cool tricks ... thanks!  :D


Continued on from the MML thread in order to stop Arkhan from getting unhappy ...

It's not really me getting unhappy.

I know, I was teasing you!  :wink:

I like it when threads can organically follow interesting thoughts, and go off-topic for a while ... but, "yeah", we'd gone so far off that we needed to take it somewhere else.

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: PCE PCM
« Reply #18 on: December 15, 2016, 04:11:06 PM »
Yeah, maybe SOMEONE

NAMED NECROMANCER

CAN MOVE THE OTHER POSTS TO THIS THREAD INSTEAD.

MAYBE.


;)  lol
[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.

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: PCE PCM
« Reply #19 on: December 15, 2016, 04:42:17 PM »
Just create a thread called "the dump" and places off topic musings in there.

Necromancer

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 21366
Re: PCE PCM
« Reply #20 on: December 16, 2016, 01:22:21 AM »
Yeah, maybe SOMEONE

NAMED NECROMANCER

CAN MOVE THE OTHER POSTS TO THIS THREAD INSTEAD.

MAYBE.


;)  lol

Tell me exactly which ones to move and I can indeed merge 'em with this thread, but I'm not going to guess which ones don't belong.  I'm too dumb to understand what the f*ck y'all are talking about, so I can't really tell which ones need moving.
U.S. Collection: 97% complete    155/159 titles

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: PCE PCM
« Reply #21 on: December 16, 2016, 06:57:31 AM »
Just delete my posts in that thread. I mean, I didn't post anything related to MML, midi, squirrel - whatever. No need to move it here. Just delete it.

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: PCE PCM
« Reply #22 on: December 16, 2016, 02:55:46 PM »
It was useful rambling though.. so I don't know if deleting it is the best move if it can just be merged here, lol
[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.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: PCE PCM
« Reply #23 on: December 16, 2016, 03:16:14 PM »
It was useful rambling though.. so I don't know if deleting it is the best move if it can just be merged here, lol

Yeah ... but who *really* wants the source-code examples for playing back samples?  :wink:

BTW ...  it looks like it'll be safe to play back up to 3 channels of samples with my code before you get to the timing-limit imposed by needing to keep servicing hsync interrupts.

You haven't weighed-in yet upon the channel-selection for the samples, and you're the guy with the most-recent experience of actually creating a game with both music and sound-effect running.

From Chris Covell's YouTube video dissecting the normal channel usage, I'm thinking that the channels 1 and 2 are normally used for the main synth leads.

That leaves three channels out of the remaining four to make sample-capable. But which three? ... And why?  :-k

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: PCE PCM
« Reply #24 on: December 16, 2016, 03:17:58 PM »
It was useful rambling though.. so I don't know if deleting it is the best move if it can just be merged here, lol

Yeah ... but who *really* wants the source-code examples for playing back samples?  :wink:

BTW ...  it looks like it'll be safe to play back up to 3 channels of samples with my code before you get to the timing-limit imposed by needing to keep servicing hsync interrupts.

You haven't weighed-in yet upon the channel-selection for the samples, and you're the guy with the most-recent experience of actually creating a game with both music and sound-effect running.

From Chris Covell's YouTube video dissecting the normal channel usage, I'm thinking that the channels 1 and 2 are normally used for the main synth leads.

That leaves three channels out of the remaining four to make sample-capable. But which three? ... And why?  :-k



the last 3 probably.  5 and 6 can be turned to noise channels.  It's likely people will already want percussion there, and that's what the samples are probably for.   

I don't think sampling on the first two is a good idea incase you want to use LFO (leads).
[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: PCE PCM
« Reply #25 on: December 16, 2016, 03:57:23 PM »
the last 3 probably.  5 and 6 can be turned to noise channels.  It's likely people will already want percussion there, and that's what the samples are probably for.   

Having noise for sound effects is important too though.   :-k  I would think using as many channels that don't have other capabilities as possible would be better as the remaining channels could then use their other capabilities if needed.  So maybe using 3, 4, and 5 would be effective leaving 1 and 2 still free for LFO (if wanted) and 6 for percussive noise freedom for sound effects?  Just a thought...


Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: PCE PCM
« Reply #26 on: December 16, 2016, 04:50:56 PM »
I don't think sampling on the first two is a good idea incase you want to use LFO (leads).

Are you talking about hardware LFO? Lol nobody.. nobody should be using hardware LFO to do... regular LFO stuffs. If you want to do non-musical screetchy stuff, kinda like what ccovell showed, then I guess.  But I personally think it's a huge waste of a channel, for a system that already should have had a couple more, when you can do so much more interesting sounds with pairing the channels in phase, etc.

 I though this was general knowledge, but if not: Every PCE channel is capable of software LFO, and isn't plagued like the master system, or triangle channel on nes, and other systems of that era where you get frequency artifacts when you change the high and low ports of the period system. PCE doesn't have any of those problems with any of its channels, making hardware LFO useless 99.9999% of the time.

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: PCE PCM
« Reply #27 on: December 16, 2016, 04:55:59 PM »
the last 3 probably.  5 and 6 can be turned to noise channels.  It's likely people will already want percussion there, and that's what the samples are probably for.   

Having noise for sound effects is important too though.   :-k  I would think using as many channels that don't have other capabilities as possible would be better as the remaining channels could then use their other capabilities if needed.  So maybe using 3, 4, and 5 would be effective leaving 1 and 2 still free for LFO (if wanted) and 6 for percussive noise freedom for sound effects?  Just a thought...
You can easily do LFSR noise in software at 7khz via DDA mode. But that aside, there the philosophy that you use all channels for music, then reserve some lesser sounds of the music for SFX overlay - so the majority of the music is still heard. If you play samples on any channel, just like regular mode - you stop outputting that sample and use the channel for whatever sound FX that occupies it. I.e. if a SFX was made from noise mode, you can stop sample streaming to play the noise SFX just like you would if the channel is in waveform mode. Matter of fact, you can mix and match of any modes at any time, as much as you want. 

Windcharger

  • Newbie
  • *
  • Posts: 44
Re: PCE PCM
« Reply #28 on: December 17, 2016, 02:26:15 PM »
the last 3 probably.  5 and 6 can be turned to noise channels.  It's likely people will already want percussion there, and that's what the samples are probably for.   

Having noise for sound effects is important too though.   :-k  I would think using as many channels that don't have other capabilities as possible would be better as the remaining channels could then use their other capabilities if needed.  So maybe using 3, 4, and 5 would be effective leaving 1 and 2 still free for LFO (if wanted) and 6 for percussive noise freedom for sound effects?  Just a thought...
You can easily do LFSR noise in software at 7khz via DDA mode. But that aside, there the philosophy that you use all channels for music, then reserve some lesser sounds of the music for SFX overlay - so the majority of the music is still heard. If you play samples on any channel, just like regular mode - you stop outputting that sample and use the channel for whatever sound FX that occupies it. I.e. if a SFX was made from noise mode, you can stop sample streaming to play the noise SFX just like you would if the channel is in waveform mode. Matter of fact, you can mix and match of any modes at any time, as much as you want.

I sure am glad we have you here Tom to set the record straight.  :)

With that logic it sounds like having them as channels 2, 3, and 4 would be good then as you don't want to put all of your channel abilities in one basket in a manner of speaking.  This way choosing to use samples isn't a trade off of any kind on a channel vs using noise mode on 5 and 6 since they are separate, no?  Although I suppose this really depends on what types of things the samples would be used for (for example just percussion).

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: PCE PCM
« Reply #29 on: December 18, 2016, 03:46:17 AM »
Windcharger: Maybe I should make page 3 of the PCE Cribsheets; audio stuffs. Sometimes it's a lot to keep track of, especially if you're not always working with the hardware directly.

 I gave my old analog oscilloscope to me brother.. arrr!. I need to buy a new (used one) in the $400-$500 range. There are certain things I want to document, such as the volume regs not taking updates immediately (the have a frequency range of something like 2khz - from testing with mednafen author). There's also a filtering effect starting around.. IIRC 6khz, which actually makes sample streaming sound a little better on the real system than emulators. Stuff like that.
« Last Edit: December 18, 2016, 06:04:00 AM by Bonknuts »