| |
ws
Registered: Apr 2012 Posts: 228 |
samples
ok, so, a long time ago, i did this:
http://dl.dataelephant.net/wl-hitormiss.prg <-- main prg (yes, it has a sample of hit or miss by ilovefriday, ffs.)
the audio data of which is built upon this script:
http://dl.dataelephant.net/conv16to8samp_unsignedraw_HITORMISS...
which converts this raw data to "c64 hi-lo-nybble 4-bit": http://dl.dataelephant.net/hitormiss8khz8bitunsigned.raw
my c64 prg uses a "mahoney-style" SID-setup and writes values to d418 in a "as fast as possible, because additional code" loop..
;--gethi lda ($fe),y ;load hi-lo nybble merged sample
pha ;store for lo-nybble later usage
processhi lsr
lsr
lsr
lsr
(..)
sta $d418
(..)
;-- getlow pla
and #$0f
(..)
sta $d418
(..)
bne loop
(..) = interim stuff, sprite coords writing.
the question is - why is there this modulation in my sample output? i tried so many things to alter the d418 writing, i just don't understand where the frequency modulation is coming from. (see .prg link above) for example the voice sounds like it has a 50-60-hz modulation to it. i'd rather have it more noisy like in: Der rosarote Panther
where in contrary the noise is very extreme. what am i doing wrong?
i also fail to understand the code .. is this also some 4-bit decoding thing? or 5bit? what is with the adc #$02??
$0a59 LDA #$01
$0a5b BIT $DD0D
BEQ $0A5B ; some timer thing obviously
LDA #$00 ; ...
ROL $07 ; this obviously contains sample data every loop
ROL ; okay another bit up the hill
ROL $07 ; okay get another bit in (is this "scaling"?)
ROL ; ye
ROL ; ah...
ADC #$02 ; ? why ?
STA $D418
the noise level of the pink panther sample is extreme, but i don't understand why it doesn't have the modulation problem of my attempt. (or does it? is this normal?)
roast me.
best
WS |
|
... 18 posts hidden. Click here to view all posts.... |
| |
ws
Registered: Apr 2012 Posts: 228 |
Another n00b question :
1. While replaying samples, the oldschool way, what is the logical explanation for the fact that we're just ramping the volume of a stalled squarewave, but the actual effect is on both sides of the center line? Why is the output not on one side of the audio 0 line but in fact it is bi-polar? If the square-wave changes polarity at any time, i would even expect long parts of the wave being on the plus side and other long parts being on the minus side, depending on the base frequency of the square wave? Why is it bi-polar/balanced?
Oldschool sample-replay output example:
https://ibb.co/Y2X4G5b (wave output screenshot)
2. Also, in the above example, which is recorded from a sample replay output like 4-bit in Pink Panther fashion, why do the horizontals graviate towards the center? In a saw-tooth-ish way? Is that the decay of the ADSR?
I am happy to read about this elsewhere, i just was unable to find anything because ... how is this even called? |
| |
Oswald
Registered: Apr 2002 Posts: 5017 |
here is my noob question, why does it work as 4th channel on a totally random volume if the other 3 is playing music :) |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1378 |
The other three have a DC component - it is the product of that with the sample that you hear as sample playback. |
| |
tlr
Registered: Sep 2003 Posts: 1714 |
Quoting wsAnother n00b question :
1. While replaying samples, the oldschool way, what is the logical explanation for the fact that we're just ramping the volume of a stalled squarewave, but the actual effect is on both sides of the center line? Why is the output not on one side of the audio 0 line but in fact it is bi-polar? If the square-wave changes polarity at any time, i would even expect long parts of the wave being on the plus side and other long parts being on the minus side, depending on the base frequency of the square wave? Why is it bi-polar/balanced?
Oldschool sample-replay output example:
https://ibb.co/Y2X4G5b (wave output screenshot)
2. Also, in the above example, which is recorded from a sample replay output like 4-bit in Pink Panther fashion, why do the horizontals graviate towards the center? In a saw-tooth-ish way? Is that the decay of the ADSR?
I am happy to read about this elsewhere, i just was unable to find anything because ... how is this even called?
It's AC coupled. See C77 here: 250469-rev.B-right.gif |
| |
Oswald
Registered: Apr 2002 Posts: 5017 |
Quote: The other three have a DC component - it is the product of that with the sample that you hear as sample playback.
that dont really explain it to me. I have 3 waveforms mixed, why dont I hear their volume changing, instead a 4th sample channel ? |
| |
DeMOSic
Registered: Aug 2021 Posts: 126 |
Quote: that dont really explain it to me. I have 3 waveforms mixed, why dont I hear their volume changing, instead a 4th sample channel ?
well. There is a bug in the Old 6581 SID chip which, whenever changing the master volume, produces a click at the set volume. So you can use those clicks rapidly to make Samples. |
| |
Mixer
Registered: Apr 2008 Posts: 422 |
https://codebase64.org/doku.php?id=base:sid_programming
Has link to some well written resources about playing samples in C-64. I recommend reading the Music Non Stop technical details by Mahoney. |
| |
ws
Registered: Apr 2012 Posts: 228 |
Oswald: think of it as subtractive mixing. Your SID-Synth-Waves create the amplitude, from which the sample is so to speak subtracted, which kind of "distorts" the synth/music content and makes the sample hearable. The simpler your synth-sound is (that is why we use a square wave as "carrier"), the cleaner the sample sound gets.
@Mixer - thanks for that link, i totally forgot to read there. |
| |
Oswald
Registered: Apr 2002 Posts: 5017 |
ws, yeah that makes more sense than its clicks :) still not 100% for me tho. It would be interesting to see sid output, and then same with d418 digi, fex simple triangle / pulse and then with some digi bass :) |
| |
ws
Registered: Apr 2012 Posts: 228 |
The clicks method is the most recent method discovered by Mahoney "clicks came whenever I toggled a voice from being routed through the analog filter of the SID chip, or not",
but what we have mostly talking about here is the good old d418 volume change method, that is disliked for its low quality and non-good-results on the new SID, because the 8580 has DC-Offset correction, so that the amplitude's null line is now correctly being centered, resulting in samples being very quiet if played with the old volume method.
all details are here: https://livet.se/mahoney/c64-files/Musik_RunStop_Technical_Deta.. |
Previous - 1 | 2 | 3 - Next |