Amen brother ~ 6 bit audio @ 16.3kHz
Moderator: Moderators
- pixel
- Vic 20 Scientist
- Posts: 1402
- Joined: Fri Feb 28, 2014 3:56 am
- Website: http://hugbox.org/
- Location: Berlin, Germany
- Occupation: Pan–galactic shaman
Amen brother ~ 6 bit audio @ 16.3kHz
Drank some window cleaner and out came this: http://hugbox.org/pixel/external/denial/amenbrother.prg
Untested on real hardware and VICE spoils the show probably due to a missing low-pass filter.
Rock'n rumble!
Untested on real hardware and VICE spoils the show probably due to a missing low-pass filter.
Rock'n rumble!
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
-
- Vic 20 Hobbyist
- Posts: 107
- Joined: Wed Oct 02, 2013 1:54 am
- Location: Italy
Re: Amen brother ~ 6 bit audio @ 16.3kHz
Hello,
Tested on my real vic20 PAL and NTSC
WORK OK....No Problem
Armando
Tested on my real vic20 PAL and NTSC
WORK OK....No Problem
Armando
- pixel
- Vic 20 Scientist
- Posts: 1402
- Joined: Fri Feb 28, 2014 3:56 am
- Website: http://hugbox.org/
- Location: Berlin, Germany
- Occupation: Pan–galactic shaman
Re: Amen brother ~ 6 bit audio @ 16.3kHz
Awesomest!armypavarmy wrote:Hello,
Tested on my real vic20 PAL and NTSC
WORK OK....No Problem
Armando
Thanks a bunch! Video anybody to show off?
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
-
- Vic 20 Hobbyist
- Posts: 107
- Joined: Wed Oct 02, 2013 1:54 am
- Location: Italy
Re: Amen brother ~ 6 bit audio @ 16.3kHz
Hello
as soon as I can I prepare videos.
With vic 20 NTSC raster bar
they are very beautiful and colorful.
The sound is ok ... just the volume a bit 'low.
Armando.
as soon as I can I prepare videos.
With vic 20 NTSC raster bar
they are very beautiful and colorful.
The sound is ok ... just the volume a bit 'low.
Armando.
- pixel
- Vic 20 Scientist
- Posts: 1402
- Joined: Fri Feb 28, 2014 3:56 am
- Website: http://hugbox.org/
- Location: Berlin, Germany
- Occupation: Pan–galactic shaman
Re: Amen brother ~ 6 bit audio @ 16.3kHz
Seems to be the trade-off. And it's already boosted with a HF carrier.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
- pixel
- Vic 20 Scientist
- Posts: 1402
- Joined: Fri Feb 28, 2014 3:56 am
- Website: http://hugbox.org/
- Location: Berlin, Germany
- Occupation: Pan–galactic shaman
Re: Amen brother ~ 6 bit audio @ 16.3kHz
And here's the code. Don't hate me. I'm an open-source guy and that cannot be fixed.
Code: Select all
restart:
lda #<sample
sta @(+ 1 +l)
lda #>sample
sta @(+ 2 +l)
ldx #0
l: ldy sample,x
nop
lda vals0,y
sta $900e
inx
beq +n
nop
bit $ea
lda vals3,y
sta $900e
cpy #$00
beq -restart
nop
bit $ea
lda vals1,y
sta $900e
inc $900f
bit $ea
lda vals2,y
sta $900e
jmp -l
n: nop
nop
lda vals3,y
sta $900e
cpy #$fe
beq -restart
nop
bit $ea
lda vals1,y
sta $900e
inc @(+ 2 -l)
bit $ea
lda vals2,y
sta $900e
jmp -l
mkval:
tya
beq +r
cmp #16
bcs +l
ldy #0
rts
l: sec
sbc #16
tay
lda #15
r: rts
; fill @(- 256 (mod *pc* 256))
main:
sei
lda #$7f
sta $912e ; Disable and acknowledge interrupts.
sta $912d
sta $911e ; Disable restore key NMIs.
lda #0
sta $9002
lda #<generated_code
sta ptr_code
lda #>generated_code
sta @(++ ptr_code)
fast6:
jsr audio_boost
ldx #0
l: txa
lsr
lsr
tay
jsr mkval
sta vals0,x
jsr mkval
sta vals1,x
jsr mkval
sta vals2,x
jsr mkval
sta vals3,x
inx
bne -l
jmp -restart
fill @(- 256 (mod *pc* 256))
sample:
@(@ [? (== 0 _) 1 _] (@ #'char-code (string-list (subseq (fetch-file "amen.wav") 44 (* 26 1024)))))
$00
fill @(- 256 (mod *pc* 256))
vals0: fill 256
vals1: fill 256
vals2: fill 256
vals3: fill 256
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
Re: Amen brother ~ 6 bit audio @ 16.3kHz
what funky assembler is that?
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
- pixel
- Vic 20 Scientist
- Posts: 1402
- Joined: Fri Feb 28, 2014 3:56 am
- Website: http://hugbox.org/
- Location: Berlin, Germany
- Occupation: Pan–galactic shaman
Re: Amen brother ~ 6 bit audio @ 16.3kHz
Well… https://github.com/SvenMichaelKlose/bender It sucks. Not sure why I'm using it.groepaz wrote:what funky assembler is that?
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
- pixel
- Vic 20 Scientist
- Posts: 1402
- Joined: Fri Feb 28, 2014 3:56 am
- Website: http://hugbox.org/
- Location: Berlin, Germany
- Occupation: Pan–galactic shaman
Re: Amen brother ~ 6 bit audio @ 16.3kHz
Dad's dangling at the Fukitol pump. Nothing doesn't matter shite anymore. Am relieved.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
-
- Vic 20 Hobbyist
- Posts: 118
- Joined: Mon Jan 04, 2016 10:17 pm
- Website: http://www.tonyrocks.com
- Location: Pittsburgh
- Occupation: IBM Watson Engr
Re: Amen brother ~ 6 bit audio @ 16.3kHz
awe man, can't somebody youtube this for me?
Re: Amen brother ~ 6 bit audio @ 16.3kHz
I used it to fix a bug in my emulator; my low-pass filter wasn't actually taking effect due to a two-line error. So this is how it'll sound in the next release, and I think it's probably accurate.
So: Youtube link.
It's very quiet though, as mentioned above. Turn your speakers up.
So: Youtube link.
It's very quiet though, as mentioned above. Turn your speakers up.
- pixel
- Vic 20 Scientist
- Posts: 1402
- Joined: Fri Feb 28, 2014 3:56 am
- Website: http://hugbox.org/
- Location: Berlin, Germany
- Occupation: Pan–galactic shaman
Re: Amen brother ~ 6 bit audio @ 16.3kHz
Lovely!Tom wrote:I used it to fix a bug in my emulator; my low-pass filter wasn't actually taking effect due to a two-line error. So this is how it'll sound in the next release, and I think it's probably accurate.
So: Youtube link.
It's very quiet though, as mentioned above. Turn your speakers up.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
- pixel
- Vic 20 Scientist
- Posts: 1402
- Joined: Fri Feb 28, 2014 3:56 am
- Website: http://hugbox.org/
- Location: Berlin, Germany
- Occupation: Pan–galactic shaman
Re: Amen brother ~ 6 bit audio @ 16.3kHz
Which emulator is it, BTW?Tom wrote:I used it to fix a bug in my emulator; my low-pass filter wasn't actually taking effect due to a two-line error. So this is how it'll sound in the next release, and I think it's probably accurate.
So: Youtube link.
It's very quiet though, as mentioned above. Turn your speakers up.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
Re: Amen brother ~ 6 bit audio @ 16.3kHz
How can it work with 6bit resolution? Volume register 900E has only 4bits available. Please explain the function
Valid rule today as earlier: 1 Byte = 8 Bits
-._/classes instead of masses\_.-
-._/classes instead of masses\_.-
- pixel
- Vic 20 Scientist
- Posts: 1402
- Joined: Fri Feb 28, 2014 3:56 am
- Website: http://hugbox.org/
- Location: Berlin, Germany
- Occupation: Pan–galactic shaman
Re: Amen brother ~ 6 bit audio @ 16.3kHz
Four pulses for each sample which add up. Doesn't give you 6 bits with 64 values really but more like 61 values. Close enough.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose