help using ctape

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

help using ctape

Gabriel Artigue
I am trying to use this small application: https://github.com/windytan/ctape
I tried it on four different computers so far, all of them with
Ubuntu. The tape-write.rb script works well, but I've never gotten
tape-read.rb to work. Nobody reported it as a bug, ever. The few
people I contacted on the web that used this application, all of them
could run it without issues.
These are two small Ruby scripts, which almost certainly are ports from Perl.
I posted on the irc for the ruby language, describing my issue:
http://irclog.whitequark.org/ruby-lang/2014-02-16#6505853
Nobody from the ruby community could point to anything wrong in those scripts.
The scripts invoke sox. Sox is installed and working great on all the
machines I've tried ctape. When I run tape-read.rb, the computer
doesn't seem to be doing anything. It does certainly not freeze. I can
press Ctrl C and exit. Sometimes, but not always, it displays the
following error message: "sox WARN dither: dither clipped 71 samples;
decrease volume?" (seventy one or other number).
The problem seems to be linked to me as a person... If it is I who run
the script, it doesn't work... I tried it on four different computers
so far. Everyone else running the script succeeds...
What am I doing wrong?
How can I correct this and successfully run tape-read.rb?
Thank you very much.

Regards,

Gabriel Artigue
(Spain)

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: help using ctape

Jan Stary
On Feb 20 09:43:58, [hidden email] wrote:
> I am trying to use this small application: https://github.com/windytan/ctape
> I tried it on four different computers so far, all of them with
> Ubuntu. The tape-write.rb script works well, but I've never gotten
> tape-read.rb to work. Nobody reported it as a bug, ever. The few
> people I contacted on the web that used this application, all of them
> could run it without issues.
> These are two small Ruby scripts, which almost certainly are ports from Perl.

The comments at https://github.com/windytan/ctape even say so.

> I posted on the irc for the ruby language, describing my issue:
> http://irclog.whitequark.org/ruby-lang/2014-02-16#6505853
> Nobody from the ruby community could point to anything wrong in those scripts.
> The scripts invoke sox. Sox is installed and working great on all the
> machines I've tried ctape. When I run tape-read.rb, the computer
> doesn't seem to be doing anything. It does certainly not freeze. I can
> press Ctrl C and exit. Sometimes, but not always, it displays the
> following error message: "sox WARN dither: dither clipped 71 samples;
> decrease volume?" (seventy one or other number).

I very much doubt that this is a SoX problem.
It's a Ruby translation of a Perl wrapper around SoX,
employed for reasons unknown.

I am a bit confused about what ctape is actually supposed to do.
The comment at https://github.com/windytan/ctape says

        Save digital data onto a Compact Cassette using a format
        resembling that of Commodore Datassette.

but then the description of tape*rb talks about writing to / reading
from a soundcard; you can do that directly with sox, so I don't know
what you even need ctape for.


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: help using ctape

Gabriel Artigue
Jan, thanks for your reply.
There is no real 'need' to use ctape. It is like building a ship
inside a bottle: you don't need the bottle, moreover, it is easier
without the bottle at all.
Using ctape is the goal. It is not a means to achieve anything else.
It is my personal quest to recover the experience of the 80s and the
70s of saving computer files to tape. And I'm not the only one trying
to recover that experience.
Those ruby scripts read from and write to the sound card: in our case
while playing a tape deck properly connected to the computer.

I am the only person in the entire Internet to have encountered
problems with ctape. I tried in four different computers so far. I
bought a tape recorder/player, which was pretty hard to find.

The ruby experts at their irc support channel say the problem is not
likely in the scripts. Sox' experienced users (you! :) ) say Sox is
not the problem. I emailed the author of ctape, still awaiting her
reply.

I don't know what else to do. I'd rather not give up. Last time I used
a tape to record and load a computer file it was the year 1990. I kind
of need to recover that part of my past. It should not be this hard.
Look at this video from the author of ctape:
http://www.youtube.com/watch?v=zu_qgwik4Dk
The ruby scripts are short and not very complicated. It is annoying
not having an explanation as to why it does not work for me.

Thanks for your time.

Regards

Gabriel
(Spain)



On Fri, Feb 21, 2014 at 10:44 AM, Jan Stary <[hidden email]> wrote:

> On Feb 20 09:43:58, [hidden email] wrote:
>> I am trying to use this small application: https://github.com/windytan/ctape
>> I tried it on four different computers so far, all of them with
>> Ubuntu. The tape-write.rb script works well, but I've never gotten
>> tape-read.rb to work. Nobody reported it as a bug, ever. The few
>> people I contacted on the web that used this application, all of them
>> could run it without issues.
>> These are two small Ruby scripts, which almost certainly are ports from Perl.
>
> The comments at https://github.com/windytan/ctape even say so.
>
>> I posted on the irc for the ruby language, describing my issue:
>> http://irclog.whitequark.org/ruby-lang/2014-02-16#6505853
>> Nobody from the ruby community could point to anything wrong in those scripts.
>> The scripts invoke sox. Sox is installed and working great on all the
>> machines I've tried ctape. When I run tape-read.rb, the computer
>> doesn't seem to be doing anything. It does certainly not freeze. I can
>> press Ctrl C and exit. Sometimes, but not always, it displays the
>> following error message: "sox WARN dither: dither clipped 71 samples;
>> decrease volume?" (seventy one or other number).
>
> I very much doubt that this is a SoX problem.
> It's a Ruby translation of a Perl wrapper around SoX,
> employed for reasons unknown.
>
> I am a bit confused about what ctape is actually supposed to do.
> The comment at https://github.com/windytan/ctape says
>
>         Save digital data onto a Compact Cassette using a format
>         resembling that of Commodore Datassette.
>
> but then the description of tape*rb talks about writing to / reading
> from a soundcard; you can do that directly with sox, so I don't know
> what you even need ctape for.
>
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
> _______________________________________________
> Sox-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: help using ctape

Fmiser
> Gabriel wrote:
>
> It is my personal quest to recover the experience of the
> 80s and the 70s of saving computer files to tape. And I'm not the
> only one trying to recover that experience.

!!!???!!!!

You _liked_ that experience?

Wow.  Best wishes on your quest. *smiles*

--  Philip, who's glad those days are gone.

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: help using ctape

Gabriel Artigue
I don't remember having said I liked that experience.
I am only trying to relive those moments.
If my childhood had been in the 1910s, in the 40s perhaps I would be
looking for stereopticals. I am not saying I like stereopticals. If my
childhood had been in the 1790s, perhaps as an adult in the 1820s I'd
be looking for a steam engine vehicle. And so on. I'm not saying old
is good. As it happened I was surronded by certain (then) modern
things in my childhood and I kind of miss them. You will soon find
yourself looking for that special link to your own youth and perhaps
you'll understand. The first ZX Spectrum be bought was a family feat,
it was my late father and my brothers traveling downtown to purchase
the machine and some tapes. Later that say an entire excited family
was listening to those screeching sounds. You know, I didn't say I
liked that, but actually liking that or not is not the question. In
1986 I loaded software from tapes, and I am determined to do that
again.
Glad these days are gone? Well, I am glad that those long ordeals
waiting for a program, or game, to load, are no longer the only way to
do it and that there are faster, better ways to do it. Now I am free
to load from tape. Back then there were few alternatives (floppy
disks, alright, but they were not as affordable as audio tapes). Back
then, and where I lived, and with my family budget, I had no
alternative.

Philip, thanks for your comment.

I still have the same problem as I described in my first post. Help
anyone? Thanks!

Gabriel.




On Fri, Feb 21, 2014 at 8:14 PM, Fmiser <[hidden email]> wrote:

>> Gabriel wrote:
>>
>> It is my personal quest to recover the experience of the
>> 80s and the 70s of saving computer files to tape. And I'm not the
>> only one trying to recover that experience.
>
> !!!???!!!!
>
> You _liked_ that experience?
>
> Wow.  Best wishes on your quest. *smiles*
>
> --  Philip, who's glad those days are gone.
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
> _______________________________________________
> Sox-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: help using ctape

Peter Shute
In reply to this post by Gabriel Artigue
Is it possible that you're just recording or replaying at too high a level, and the sound is too clipped to recover the data? Do other users get that same warning? Are you replaying it via the line in jack, not the mic jack? It might be worth digitising the recording and having a look at the waveform in Audacity, etc to see if it looks right.

I assume the scripts just turn the file into a series of tones, which you record. And then you play it back and digitise the sound, and a program interprets the tones to recreate the file. Does that mean you have the digitised sound file that you could email to someone to see if they can interpret it?

And I wonder if it's possible to try taking the recorder out of the process by just creating the sound file and then interpreting it, without the intermediate steps of recording and replaying. If that works then it would prove whether the recording and replaying parts are the problem.

My vague memory of the original process was that one had to be careful what type of recorder one used (avoid automatic level control?) and that one had to set the recording and playback levels carefully.

It's off topic, but I despised saving files to cassette tape. It wasn't the speed that was the problem - it was wonderful not to have to rekey programs - it was the difficulty finding them again on the tape, and the ease of accidentally overwriting another file that I hated. I outgrew floppy disks nearly as quickly. I do system backups on LTO tapes, and it's still a pain.

Peter Shute

Sent from my iPad

> On 20 Feb 2014, at 7:44 pm, "Gabriel Artigue" <[hidden email]> wrote:
>
> I am trying to use this small application: https://github.com/windytan/ctape
> I tried it on four different computers so far, all of them with
> Ubuntu. The tape-write.rb script works well, but I've never gotten
> tape-read.rb to work. Nobody reported it as a bug, ever. The few
> people I contacted on the web that used this application, all of them
> could run it without issues.
> These are two small Ruby scripts, which almost certainly are ports from Perl.
> I posted on the irc for the ruby language, describing my issue:
> http://irclog.whitequark.org/ruby-lang/2014-02-16#6505853
> Nobody from the ruby community could point to anything wrong in those scripts.
> The scripts invoke sox. Sox is installed and working great on all the
> machines I've tried ctape. When I run tape-read.rb, the computer
> doesn't seem to be doing anything. It does certainly not freeze. I can
> press Ctrl C and exit. Sometimes, but not always, it displays the
> following error message: "sox WARN dither: dither clipped 71 samples;
> decrease volume?" (seventy one or other number).
> The problem seems to be linked to me as a person... If it is I who run
> the script, it doesn't work... I tried it on four different computers
> so far. Everyone else running the script succeeds...
> What am I doing wrong?
> How can I correct this and successfully run tape-read.rb?
> Thank you very much.
>
> Regards,
>
> Gabriel Artigue
> (Spain)
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
> _______________________________________________
> Sox-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: help using ctape

Gabriel Artigue
Thanks for your reply, Peter.

> Is it possible that you're just recording or replaying at too high a level, and the
> sound is too clipped to recover the data?

If "level" means volume, I've tried all possible ways and combinations
by now. Or does "level" mean something else?

> Do other users get that same warning?

None that I know of.

> Are you replaying it via the line in jack, not the mic jack?

I tried both.

> It might be worth digitising the recording and having a look at the
> waveform in Audacity, etc to see if it looks right.

I could digitise it -- but I'm illiterate at analysing waveforms.

> I assume the scripts just turn the file into a series of tones, which you record.

The script tape-write.rb transforms a computer file directly into
sound, it does not create a wav file or any other kind of sound file.

> And then you play it back and digitise the sound, and a program interprets
> the tones to recreate the file.

The script tape-read.rb digitises the sound on the fly, as you
introduce it. It does not convert a wav or otherwise sound file into
another (the original) computer file.

> Does that mean you have the digitised sound file that you could
> email to someone to see if they can interpret it?

I could digitise the screeching sound. However, this is not how the
scripts of ctape work. It interprets the "modem" sound on the fly.
Look at this mind blowing video by the author of the scripts:
http://www.youtube.com/watch?v=zu_qgwik4Dk

> And I wonder if it's possible to try taking the recorder out of the process by
> just creating the sound file and then interpreting it, without the intermediate
> steps of recording and replaying. If that works then it would prove whether
> the recording and replaying parts are the problem.

How exactly would you do that? I'm afraid I didn't understand this part.

> My vague memory of the original process was that one had to be careful
> what type of recorder one used (avoid automatic level control?) and that
> one had to set the recording and playback levels carefully.

(Does "levels" mean just volume?) It is true that you had to set the
recording and play volumes carefully. Regarding the kind of recorder,
the system as such was very tolerant. There were only a few kinds of
recorders to avoid, but almost anyone would do.

Oh, I despised a lot of things of using tapes to save and load data.
I'm glad that twenty four years ago I stopped having to rely solely on
that storage medium. Now that I rely on other ways to store data, I am
free to use the tapes just for the fun (/h***ll) of it. There is
little to love about cassettes as a storage device, except (in my
case) bringing back memories from my childhood that I keep very
dearly.

Thanks again, Peter.


Regards

Gabriel





On Sat, Feb 22, 2014 at 12:08 AM, Peter Shute <[hidden email]> wrote:

> Is it possible that you're just recording or replaying at too high a level, and the sound is too clipped to recover the data? Do other users get that same warning? Are you replaying it via the line in jack, not the mic jack? It might be worth digitising the recording and having a look at the waveform in Audacity, etc to see if it looks right.
>
> I assume the scripts just turn the file into a series of tones, which you record. And then you play it back and digitise the sound, and a program interprets the tones to recreate the file. Does that mean you have the digitised sound file that you could email to someone to see if they can interpret it?
>
> And I wonder if it's possible to try taking the recorder out of the process by just creating the sound file and then interpreting it, without the intermediate steps of recording and replaying. If that works then it would prove whether the recording and replaying parts are the problem.
>
> My vague memory of the original process was that one had to be careful what type of recorder one used (avoid automatic level control?) and that one had to set the recording and playback levels carefully.
>
> It's off topic, but I despised saving files to cassette tape. It wasn't the speed that was the problem - it was wonderful not to have to rekey programs - it was the difficulty finding them again on the tape, and the ease of accidentally overwriting another file that I hated. I outgrew floppy disks nearly as quickly. I do system backups on LTO tapes, and it's still a pain.
>
> Peter Shute
>
> Sent from my iPad
>
>> On 20 Feb 2014, at 7:44 pm, "Gabriel Artigue" <[hidden email]> wrote:
>>
>> I am trying to use this small application: https://github.com/windytan/ctape
>> I tried it on four different computers so far, all of them with
>> Ubuntu. The tape-write.rb script works well, but I've never gotten
>> tape-read.rb to work. Nobody reported it as a bug, ever. The few
>> people I contacted on the web that used this application, all of them
>> could run it without issues.
>> These are two small Ruby scripts, which almost certainly are ports from Perl.
>> I posted on the irc for the ruby language, describing my issue:
>> http://irclog.whitequark.org/ruby-lang/2014-02-16#6505853
>> Nobody from the ruby community could point to anything wrong in those scripts.
>> The scripts invoke sox. Sox is installed and working great on all the
>> machines I've tried ctape. When I run tape-read.rb, the computer
>> doesn't seem to be doing anything. It does certainly not freeze. I can
>> press Ctrl C and exit. Sometimes, but not always, it displays the
>> following error message: "sox WARN dither: dither clipped 71 samples;
>> decrease volume?" (seventy one or other number).
>> The problem seems to be linked to me as a person... If it is I who run
>> the script, it doesn't work... I tried it on four different computers
>> so far. Everyone else running the script succeeds...
>> What am I doing wrong?
>> How can I correct this and successfully run tape-read.rb?
>> Thank you very much.
>>
>> Regards,
>>
>> Gabriel Artigue
>> (Spain)
>>
>> ------------------------------------------------------------------------------
>> Managing the Performance of Cloud-Based Applications
>> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
>> Read the Whitepaper.
>> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Sox-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/sox-users
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
> _______________________________________________
> Sox-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: help using ctape

Peter Shute
> On 22 Feb 2014, at 12:43 pm, "Gabriel Artigue" <[hidden email]> wrote:
>
> Thanks for your reply, Peter.
>
>> Is it possible that you're just recording or replaying at too high a level, and the
>> sound is too clipped to recover the data?
>
> If "level" means volume, I've tried all possible ways and combinations
> by now. Or does "level" mean something else?

Yes, that's what I meant.

>> It might be worth digitising the recording and having a look at the
>> waveform in Audacity, etc to see if it looks right.
>
> I could digitise it -- but I'm illiterate at analysing waveforms.

I'm not sure what to look for either, apart from clipping. I assume there are some sample waveforms out there to compare it to.

>> And I wonder if it's possible to try taking the recorder out of the process by
>> just creating the sound file and then interpreting it, without the intermediate
>> steps of recording and replaying. If that works then it would prove whether
>> the recording and replaying parts are the problem.
>
> How exactly would you do that? I'm afraid I didn't understand this part.

I assume you would have to modify the scripts. It might be that sox is used to create the sounds. If so then if you show us the command here, someone may be able to suggest how to direct it into a file instead.

Same for the reading script. It might be possible to change it to read from the file produced by the first part.


> Oh, I despised a lot of things of using tapes to save and load data.
> I'm glad that twenty four years ago I stopped having to rely solely on
> that storage medium. Now that I rely on other ways to store data, I am
> free to use the tapes just for the fun (/h***ll) of it. There is
> little to love about cassettes as a storage device, except (in my
> case) bringing back memories from my childhood that I keep very
> dearly.

I was always a little interested to see how it worked too. Back then the only way I could think of to investigate was to use an oscilloscope, which I didn't have, and it should be much easier now with sound cards and sound editors commonplace. But I'll resist the temptation to try it for myself.

Peter Shute
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: help using ctape

andrew
I missed the start of this, but...

The process depends on a decent frequency response, to get a good definition of the pulses. The device must be capable of decent quality audio in the first place.

If you use different devices for rec and rep, or if you use a 3 head device, azimuth rears up and bites you.

Andrew

On February 22, 2014 2:28:46 AM GMT, Peter Shute <[hidden email]> wrote:
On 22 Feb 2014, at 12:43 pm, "Gabriel Artigue" <[hidden email]> wrote:

Thanks for your reply, Peter.

Is it possible that you're just recording or replaying at too high a level, and the
sound is too clipped to recover the data?

If "level" means volume, I've tried all possible ways and combinations
by now. Or does "level" mean something else?

Yes, that's what I meant.

It might be worth digitising the recording and having a look at the
waveform in Audacity, etc to see if it looks right.

I could digitise it -- but I'm illiterate at analysing waveforms.

I'm not sure what to look for either, apart from clipping. I assume there are some sample waveforms out there to compare it to.

And I wonder if it's possible to try taking the recorder out of the process by
just creating the sound file and then interpreting it, without the intermediate
steps of recording and replaying. If that works then it would prove whether
the recording and replaying parts are the problem.

How exactly would you do that? I'm afraid I didn't understand this part.

I assume you would have to modify the scripts. It might be that sox is used to create the sounds. If so then if you show us the command here, someone may be able to suggest how to direct it into a file instead.

Same for the reading script. It might be possible to change it to read from the file produced by the first part.


Oh, I despised a lot of things of using tapes to save and load data.
I'm glad that twenty four years ago I stopped having to rely solely on
that storage medium. Now that I rely on other ways to store data, I am
free to use the tapes just for the fun (/h***ll) of it. There is
little to love about cassettes as a storage device, except (in my
case) bringing back memories from my childhood that I keep very
dearly.

I was always a little interested to see how it worked too. Back then the only way I could think of to investigate was to use an oscilloscope, which I didn't have, and it should be much easier now with sound cards and sound editors commonplace. But I'll resist the temptation to try it for myself.

Peter Shute


Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk


Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: help using ctape

Fmiser
In reply to this post by Gabriel Artigue
> Gabriel wrote:
>
> I am trying to use this small application:

> The tape-write.rb script works well, but I've never gotten
> tape-read.rb to work.

> The scripts invoke sox. Sox is installed and working
> great on all the machines I've tried ctape.

> I can press Ctrl C and exit. Sometimes, but not always, it
> displays the following error message: "sox WARN dither: dither
> clipped 71 samples; decrease volume?" (seventy one or other
> number).

This is a clue.  SoX would not issue a warning if there wasn't
audio "passing through".  So SoX is processing audio - but it seems
it is getting lost later in the chain.

> > Peter wrote:

> > I assume the scripts just turn the file into a series of tones,
> > which you record.  

> The script tape-write.rb transforms a computer file directly into
> sound, it does not create a wav file or any other kind of sound file.

Err, it can't.  On a computer, sound is a "file" sent to a digital
to analog converter in the soundcard that creates an analog
waveform that when fed to a loudspeaker (often after being
amplified) creates sound.

I'm guessing then that tape-write creates an analog audio signal on
the output jack of the soundcard.

Any "file" that can be "written" to the soundcard could also be
written to a file.

> > And then you play it back and digitise the sound, and a program
> > interprets the tones to recreate the file.  

> The script tape-read.rb digitises the sound on the fly, as you
> introduce it. It does not convert a wav or otherwise sound file into
> another (the original) computer file.

Sound is useless to a computer.  The sound has to be converted to a
analog electrical waveform (by a microphone) and that waveform
converted to a digital format by the analog-to-digital converter in
the soundcard.

Since SoX is issuing warning, I'm guessing that audio is getting in
the input jack, and is getting to SoX - but whatever is supposed to
be getting the output of SoX isn't working, is looking in the wrong
place, permissions are interfering,  or ???.   But since there is a
warning, it looks like the cassette player, audio cord, soundcard,
and soundcard mixer are all okay.

All that is just hints and clues - I don't have any conclusions...

--   Philip

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: help using ctape

Jan Stary
On Feb 22 11:55:30, [hidden email] wrote:
> > > I assume the scripts just turn the file into a series of tones,
> > > which you record.  
>
> > The script tape-write.rb transforms a computer file directly into
> > sound, it does not create a wav file or any other kind of sound file.
>
> Err, it can't.  On a computer, sound is a "file" sent to a digital
> to analog converter in the soundcard

Stop spreading nonsense. It is entirely possible to just
write data to an audio device, without any intermediate files.

Anyway, this whole thread is hardly SoX-related.

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: help using ctape

Peter Shute
On 24 Feb 2014, at 4:08 am, "Jan Stary" <[hidden email]<mailto:[hidden email]>> wrote:

Anyway, this whole thread is hardly SoX-related.

If I found the right project then the whole thing relies on sox, so once we see the relevant parts of the source then it may become so.

I don't understand Ruby, but this seems to be the relevant line from the writing script at https://github.com/windytan/ctape/blob/master/tape-write.rb


$sox = IO.popen('sox -q -t .raw -r 44100 -c 1 -b 16 -e signed-integer - '+$device,'w')

It later uses commands like:

    $bitlen.times     { $sox.write [-0x7FFF * $volume].pack("s") }

If that using libsox? I've never used that. It looks like you could make it write to a file by changing $device, which it reads from a config file. The example value given for $device is:
device: -t alsa "hw:0"

I don't know what that means either. Is it more sox parameters?

Peter Shute
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: help using ctape

Jan Stary
On Feb 24 05:34:17, [hidden email] wrote:
> $sox = IO.popen('sox -q -t .raw -r 44100 -c 1 -b 16 -e signed-integer - '+$device,'w')

If $device is an actual audio device, this is a legitimate sox line
to write raw 16bit signed samples @ 44100 to that device.
Is there is a problem with that, it is not a SoX problem.

> It later uses commands like:
>     $bitlen.times     { $sox.write [-0x7FFF * $volume].pack("s") }

I think this just pushes data into the pipe popened above.
Whatever data that is, which is not SoX's problem.

> If that using libsox?
> I've never used that. It looks like you could make it write to a file by changing $device, which it reads from a config file. The example value given for $device is:
> device: -t alsa "hw:0"
> I don't know what that means either.
> Is it more sox parameters?

On some systems (looks like linux) this is a legitimate value for $device,
i.e. one that makes it a legitimate sox command line.

Which further strenghtens my suspiscion that the problem (which we don't
actually know besides "this ruby script that calls sox does not work for me")
is not a SoX problem.

To the OP: during execution of the script, use ps(1) to see
the actuall full and exact sox command that the script is running.
Possibly change the call to 'sox' in the script to 'sox -V'.


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users