This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2011-01-06 15:56:34

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Easy sound based file conversion

note my analysis now added to above post

Last edited by sparks (2011-01-06 16:12:14)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#27 2011-01-06 16:14:47

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Easy sound based file conversion

Recieving script:
http://img339.imageshack.us/img339/9820/99222599.gif

Sending script:
http://img28.imageshack.us/img28/2373/85657736.gif

Last edited by sparks (2011-01-06 16:22:32)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#28 2011-01-06 16:28:21

coupdegrace
Scratcher
Registered: 2009-12-02
Posts: 42

Re: Easy sound based file conversion

On a MacBook pro, full volume, barely any ambient noise, no jack-to-jack cable, it only starts picking things up around volume 40
hmm


[CENTER]http://www.nodiatis.com/pub/11.jpg[/CENTER]

Offline

 

#29 2011-01-06 16:35:29

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Easy sound based file conversion

move mic and speaker closer or turn up volume or turn up mic sensitivity or all of those!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#30 2011-01-06 16:36:50

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Easy sound based file conversion

I'm thinking we should have a script that puts out a tone of known volume and then asks you to line them up until the icon is green. Gonna try that tomorrow. Too tired right now.

I think some more experimentation should be done, after all, I've found two different instruments that are of different physical volume on the same scratch volume setting.

Sparks: If someone wants to look at Scratch's ability to measure duration, e.g. smallest duration registered as correct volume, smallest difference noticed between durations etc.

"Herbert S. Zim, in his classic introductory cryptography text "Codes and Secret Writing", gives the English letter frequency sequence as "ETAON RISHD LFCMU GYPWB VKXJQ Z", the most common letter pairs as "TH HE AN RE ER IN ON AT ND ST ES EN OF TE ED OR TI HI AS TO", and the most common doubled letters as "LL EE SS OO TT FF RR NN PP CC".[1]"

Source: Wikipedia.

This might be worth using. The order of characters should let us put the most commonly used in the shortest duration, with the greatest accuracy.

The double characters and letter pairs might, providing the tone is still shorter than two of the shortest tones, allow us to speed transfer up!

This does not, however look at other ascii characters. (space might be used more than e for example)

this website claims there are 255 ascii characters in total. I suppose that makes sense as 255 is a value commonly seen in binary. I don't think Scratch supports all these characters though. Certainly, Some of them cannot be typed in, but some cannot be typed but manually pasted, and some appear as a small square but, when recopied, retain their original character image again.

Last edited by sparks (2011-01-06 16:52:19)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#31 2011-01-06 17:41:28

coupdegrace
Scratcher
Registered: 2009-12-02
Posts: 42

Re: Easy sound based file conversion

My house is loud again  sad
I can't work on this until tomorrow  sad


[CENTER]http://www.nodiatis.com/pub/11.jpg[/CENTER]

Offline

 

#32 2011-01-06 17:45:54

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Easy sound based file conversion

do you have a large family or some young siblings then?  sad


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#33 2011-01-06 17:51:18

coupdegrace
Scratcher
Registered: 2009-12-02
Posts: 42

Re: Easy sound based file conversion

A young sibling who is constantly
Singing
Screaming
Watching TV


[CENTER]http://www.nodiatis.com/pub/11.jpg[/CENTER]

Offline

 

#34 2011-01-06 18:09:04

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: Easy sound based file conversion

Ooh, can I help? I have a mic, speakers, AND an audio cable!  big_smile


Yawn.

Offline

 

#35 2011-01-06 18:13:30

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Easy sound based file conversion

feel free! This is totally open to everyone to contribute!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#36 2011-01-06 23:07:19

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Easy sound based file conversion

I... Don't get anything, even knowing quite a bit about sound stuff.  tongue  Maybe it's because it's 1:00 AM here right now and I read everything quickly, lol. Indeed it sounds interesting, but I think there'll be many inaccuracies using note duration (lag while counting time) or loudness (particularly when using the mic-speaker combo). But then it'll take lots of time to transfer. Maybe somehow let the user find an equilibrium between "data quality" (less quality - more possible glitches) and time needed to transfer that data.  hmm

I have a good amount of sound cables, a semi-decent mic and some audio understanding (from a musician's point of view at least  wink  ), I'll see if I can help tomorrow. If I can't manage to understand how it works I can help testing  lol

Last edited by technoguyx (2011-01-07 13:22:27)


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#37 2011-01-07 15:19:02

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Easy sound based file conversion

right, having noticed that volume 80 is the highest output volume that is registered as different by at least 5 points at the ideal (no background noise, connected by a cable) connection, I''m setting up a program that helps you align your speaker and mic until the correct, optimal position is reached. I'll post it up in a bit..


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#38 2011-01-07 16:31:52

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Easy sound based file conversion

Let me give you some more maths.
For now, just imagine we are using these figures.
5 possible volumes (0-20, 21-40, 41-60, 61-80, 81-100)
2 possible tone lengths (0.3 seconds and 0.6 seconds)
A fairly quiet place
A calibration method
32 characters to transmit -- The string "hello, i am playing with my dog."

for every volume, there are two possibilities of tone length. That makes (i beleive) 10 combinations. to reach the total of 255 characters while excluding some useless ones just to round it nicely, we need a number of characters able to fit it perfectly.

Forgive my puny trial and error strategy, but I'm tired and cannot think properly.
1 tones per character: 10 possibilities
2 tones per character: 10² possibilities = 100
3 tones per character: 10³ possibilities = 1000 characters possible??

ok, forget the tone length then. Have it a single length so:
1 -> 5
2 -> 5² = 25
3 -> 5³ = 125
I'm happy with 125, just enough for the common letters and symbols.

How does it seem to you?  big_smile

Oh, and goodnight  big_smile

Last edited by LS97 (2011-01-07 16:32:11)

Offline

 

#39 2011-01-07 16:57:08

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Easy sound based file conversion

so you're saying three tones (each of which is one of two lengths and one of five volumes can represent 1000 characters,

or three tones all of equal length but all with one of five volumes can represent 125 characters?

I have to say that tone length will be by FAR less prone to error because you're just comparing loud and quiet, but on the other hand, long tones mean very long transfer times.

I like the thought of 5 volumes per tone length because it allows quite a wide loudness to represent each character, meaning it has to be less carefully caliabrated.

I'm torn between a program that recieves a tone of known volume, reads the volume that tone is recieved at, and then caliabrates all the other volumes to reflect that known value and getting the user to move the speaker and mic around and adjust mic sensitivity and speaker volume until the known volume being broadcast and the volume actually recieved are the same. This increased accuracy may be worth the speed sacrifice in the end!

The first is easier for the user, but if the initial tone is very quiet, the lower characters may not be spotted whilst if the initial tone is very loud, the higher characters may not be read properly.

The second is harder on the user, but it allows the program to know that it is reading the correct volume at the start of the process and will probably work better.

I think that if the difference in tone length (that is registered) is small, it might be much less glitchy to have 5 tone lengths and two loudnesses. This would be a lot more accurate and would allow for a range of distance between transmitter and reciever.

If not, maybe playing the five volumes from the transmitter repeatedly and having the reciever compare them until ALL 5 ARE DIFFERENT, then set variables 1,2,3,4 and five to those volumes. Then you know all volumes have  been recieved, that they are registered as different, and what volumes they were recieved at!

Last edited by sparks (2011-01-07 16:59:48)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#40 2011-01-10 06:59:24

coupdegrace
Scratcher
Registered: 2009-12-02
Posts: 42

Re: Easy sound based file conversion

I like your bolded idea, Sparks!
I also like how you wrote "1, 2, 3, 4, and five"  tongue


[CENTER]http://www.nodiatis.com/pub/11.jpg[/CENTER]

Offline

 

#41 2011-01-10 07:23:54

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Easy sound based file conversion

When I saw this I was like "I hope they don't choose volume" and read the next few posts and you do. I think you should have this setup:
Send the message: hi
h = 8 (8 in alphabet)
i = 9 (9 in alphabet)

set tempo to | 60 |
set volume to | 100 |
play note 60 for | 0.8 |
rest for 5 beats
play note 60 for | 0.9 |



reciever
forever
if <loudness > 50>
| reset timer
| repeat until < <timer > 3> or <loudness< 50> >
|  | set time to ( (timer) * 10 )
|  |________________________________________
| set time to (item (time) of |alphabet| )
| add time to message
|_________________


You can now reach me on Twitter @johnnydean1_

Offline

 

#42 2011-01-10 08:41:46

forest
Scratcher
Registered: 2007-07-29
Posts: 100+

Re: Easy sound based file conversion

Not sure if this is relevant but my brother is a radio amateur..and i am sure data for computer programs has been broadcast via radio..before now..anyway that is all..
really.

Offline

 

#43 2011-01-10 10:16:59

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Easy sound based file conversion

jd1, the problem with that is that using only pulse length is that the file transfer will take a LOOOONG time


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#44 2011-01-10 11:07:25

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Easy sound based file conversion

Can I help? I'm a good "encoder"

P.S. This is completely off-topic, but I made a way to do you 'image to text' Panther project to Scracth. It's in the Misc. forums.

Last edited by Hardmath123 (2011-01-10 11:14:43)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#45 2011-01-10 11:14:03

Taneb
Scratcher
Registered: 2009-07-07
Posts: 100+

Re: Easy sound based file conversion

Offline

 

#46 2011-01-11 06:52:27

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Easy sound based file conversion

Hardmath123, Could you link to it? it sounds interesting!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

Board footer