Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Sample streaming from tape
2023-10-31 04:25
Martin Piper

Registered: Nov 2007
Posts: 699
Sample streaming from tape

Has anyone done four bit sample streaming from tape before? I'm thinking the time between pulses can be directly translated to four bit volume values as they are read from tape.
Practically useless, except for pure geekyness. But I wanted to know if it's been done, before I do it myself.
 
... 36 posts hidden. Click here to view all posts....
 
2023-11-11 21:49
Oswald

Registered: Apr 2002
Posts: 5074
Quote: Improved sample rate. Same instructions and links as post #16 above...

Download this PRG: https://github.com/martinpiper/C64Public/raw/master/IRQTape/Tap..

Download this TAP file: https://github.com/martinpiper/C64Public/raw/master/IRQTape/vic..

You should see narrow colour bars indicating the volume this time. This time it's using "Tom's Diner".


that sounds very good
2023-11-12 03:29
Martin Piper

Registered: Nov 2007
Posts: 699
Quote: At least to test jitter. Iirc, 95% Jitter is surprisingly small, within a 6 cycle window. But the other 5% are far off, so you have to increase your pulse lengths. And if you want to write with a PC, you will stick to 44100 anyways.

But why is there so much noise in this sample??


Downloaded from YouTube. Volume increased to increase the range of volume bits used. Also the quantization is accentuating rumble and hiss.
2023-11-12 09:37
tlr

Registered: Sep 2003
Posts: 1762
Quote: Downloaded from YouTube. Volume increased to increase the range of volume bits used. Also the quantization is accentuating rumble and hiss.

With this variable sample rate, how do you do your downsampling/alias filtering of the source material?
2023-11-12 10:32
Martin Piper

Registered: Nov 2007
Posts: 699
Quote: With this variable sample rate, how do you do your downsampling/alias filtering of the source material?

I don't, which obviously doesn't help at all. :)

New build using IRQ (and a NOP fill) is available at the same links as post #16. The sound quality is improved because there is less jitter in the pulse detection. I was also able to add timer underflow detection which clamps the volume appropriately.

Anyone recognise the music? :)
2023-11-12 10:51
Martin Piper

Registered: Nov 2007
Posts: 699
Hmm, so at the moment the 16 volume values are separated by 16 cycles, which is 256 cycles in total. A base value or 56 cycles is added. This means an early pulse or longer pulse (due to tape speed or wobble) has the high timer bit set.

The timer is setup to count cycles to measure the pulse length... The read of the high timer value and the associated branch adds precious cycles to the IRQ, which reduces the overall maximum volume value rate from the tape.

However... what if the one timer was setup to count not cycles but "cycles divided by 2" instead. This would allow the middle 128 value range of the timer to represent the desired pulses and anything outside that range to represent undesired values and clamp the volume appropriately.

This would mean the timer is doing the underflow check, not the CPU, which would save precious cycles in the IRQ and allow a higher sample rate.
2023-11-12 11:18
Hoogo

Registered: Jun 2002
Posts: 103
You can't have less than 2 cycles of jitter, so a long column of INX can do the counting instead. Just add a Jmp * at the end.
2023-11-12 11:27
tlr

Registered: Sep 2003
Posts: 1762
Quote: You can't have less than 2 cycles of jitter, so a long column of INX can do the counting instead. Just add a Jmp * at the end.

very clever, then you can just interweave nop's and inx's to acheive the counting rate you desire. Also, if you have decided on an acceptable range for each transition, the inx/nop chain need not be repeated, you can add a branch where there is supposed to be no transition.
2023-11-12 12:47
Martin Piper

Registered: Nov 2007
Posts: 699
Quote: You can't have less than 2 cycles of jitter, so a long column of INX can do the counting instead. Just add a Jmp * at the end.

Could do. But I actually want to use the mainline for other code. :) Perhaps even enable the screen with some scroller...
2023-11-12 12:54
Martin Piper

Registered: Nov 2007
Posts: 699
Interesting. If you're using vice, in the monitor do "> d011 1b" and the sample quality with the screen on can be heard.
Not too bad. Time for a scroller? :)
2023-11-12 15:41
Martin Piper

Registered: Nov 2007
Posts: 699
Links updated with 6.3KHz sample rate now.
Timer A and B are used, which means the CIA can do the underflow and overflow check for free. So the IRQ sample play is much simpler.
Previous - 1 | 2 | 3 | 4 | 5 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Didi/Laxity
Guests online: 94
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 Comaland 100%  (9.6)
8 Wonderland XIV  (9.6)
9 No Bounds  (9.6)
10 Unboxed  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Morph  (9.5)
8 Dawnfall V1.1  (9.5)
9 Onscreen 5k  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Nostalgia  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.2)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.2)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.04 sec.