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: 697
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-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: 697
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: 697
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: 697
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.
2023-11-12 18:27
ws

Registered: Apr 2012
Posts: 248
Nice Megablast! I'm really curious, where this will lead to, quality wise.

I had a thought, that surely is sort of defeating the actual streaming idea, but i'd like to ask it anyways:

If the recording was recorded slowed down, the loading of the sample buffered and then replayed faster, could that improve overall quality in any significant way?
yeah i know, "why not load actual sampled data, then", but i just had to ask. i was thinking maybe this way perhaps one and a half RAM fillings could be played without having to pre-buffer again, like a Shortplay Mode.

[@ scroller: maybe a screen-off-with sprites scroller would be keeping the quality at max?]
2023-11-13 02:39
Martin Piper

Registered: Nov 2007
Posts: 697
Instead of using 16 cycles as a multiplier for each volume level, I tried 8 cycles. The sound quality is better due to being able to play back at a higher frequency. However it only sounds better in Vice with zero tape wobble. The default Vice tape wobble of 10 cycles will cause an overall drop in audio quality.

This is a side effect of using frequency modulation to encode the volume on a device prone to frequency shifts. :)

A multiplier of 16 cycles, whilst being easy to encode in the TAP file, also seems to be a sweet spot for "accurate enough" reading of sample volumes at a high enough speed for quality purposes.

Turning on the screen causes high frequency noise, due to the bad lines introducing a regular spike in the volume read from the tape.

WangFM Megablast
2023-11-13 07:56
MagerValp

Registered: Dec 2001
Posts: 1065
Starting to sound pretty nice!

Would be interesting to hear if delta coding with three or five pulses sounds better. Both would at least double the frequency.
2023-11-13 08:33
Krill

Registered: Apr 2002
Posts: 2940
Pretty sure that proper resampling of the input wave to suit the encoding would make for a tremendous improvement in quality, much more than tinkering with C-64 side code details.
2023-11-13 08:51
tlr

Registered: Sep 2003
Posts: 1762
Quote: I think ”Pulse” by pixel for the vic-20 uses this technique for music playback somewhere in the loading sequence.

for the record, this can be found here: https://eyes-uk.itch.io/pulse

srcs:
- https://github.com/SvenMichaelKlose/nipkow
- https://github.com/SvenMichaelKlose/pulse
2023-11-13 17:52
soci

Registered: Sep 2003
Posts: 478
I'm wondering, did anyone tried this with an actual datassette yet?
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
Adder/Triad
manganoid/Hokuto Force
csabanw
jicas/Patagonia
CA$H/TRiAD
Guests online: 109
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Mojo  (9.7)
5 Edge of Disgrace  (9.6)
6 3SIRA  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Comaland 100%  (9.6)
10 No Bounds  (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 Dawnfall V1.1  (9.5)
8 Onscreen 5k  (9.5)
9 Quadrants  (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 Logo Graphicians
1 Sander  (9.8)
2 Mermaid  (9.5)
3 Facet  (9.4)
4 Shine  (9.4)
5 Pal  (9.4)

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