[comp.sys.next] Next programming

c6787903@scheme.cs.ubc.ca (02/20/91)

Hi!

I've got a couple of programming problems:

a) I want to be able to change the replay speed of CODEC sounds.
How do I do this?
At present I get a pointer to the sound data, and then I a make a new SNDstruct. Into that sound struct I copy all my old data, duplicating samples if I want to slow things down, and cutting some if I want to speed things up.
This seems totally crazy, since all I want is tell the DSP to replay slower/faster.
b) Is there some way of getting a pointer to the samples that the DSP is processing while a sound is being played? Goal here would be instant rewind/replay/ffwd etc. I figure there must be some way for the DSP to keep track of the memory it's reading from, so why not alter that pointer?
c) What exactly is the MULAW_SQUELCHED format (= I want the GORY details!)? Goal is to slow text down for a typist: scan through the sound, find all encoded silences, strech them as necessary, then play.
d) What is the .wn file format? Is there a wn2ascii out there?

Thanks.

(please E-mail me since I usually don't read the news: c6787903@scheme.cs.ubc.ca)

me@spirea.UiB.NO (My Account) (04/16/91)

rsmyth@uncvx1.bitnet writes:

>The purchase of a NeXtStation by someone who does not know how to program
>it is a foolish mistake.  I have studied the three manuals that came with
>ser's Reference", and "Network and System Administration".  In addition,
>I have worked thru "The Next Bible", "Introduction to Vax/VMS", "Kermit"
>
>(by Frank da Cruz), "Learning the Unix Operating System", "Unix Made Easy", and
>an assortment of documents on Bitnet, Telnet and FTP.  I still do not know
>enough to use the kermit program or the tip program.  Indeed, I still do not
>know what the languages are that I will have to master, in order to use
>my NeXtStation.  Two questions: 1) Which book or books should I read next?
>2) Why do NeXt representatives lack ordinary manners?

and then...

>Eric Scott asks what I want info about.  I have had a series of
>catastrophes with everything I've tried.  At the moment I am
>concentrating on the problem of using kermit to get an executible
>program from a remote file through a serial port, hayes-type
>modem, via a Vax, and FTP.  I have been able to get programs back,
>but get a screen that says "(process exited)". Neither my Next
>manuals, Vax book, or FTP stuff tells me what this means.  I "nroff"
>and see a program.  I cmod +x, set permissions, etc.  Da Cruza's book
>says that if a text file arrives but has junk at the end, you must
>set EOF (I can't on my system) or use a text editor to remove NUL
>stuff.  I have tried to use Edit, but, remember, I am a total
>computer illiterate.  Let's all agree I was an idiot to purchase a
>machine I am too stupid to use. Still,  I need help on documentation
>about these error messages and how to cope with them. The Next
>people are no use.  I have searched a research university library
>and five bookstores, in addition to the stuff I mentioned in the first
>posting.  I've been through almost all the Next-L logs--a long, long
>job, and I know that lots of computer pros have had some of my problems
>with kermit and the serial port.  This is only an
>example of my trouble; it has been an education.

Well, I found it difficult to beleive that someone could experience so many problems simply using kermit :-)

I'm no programmer - I'm a psychology grad student, and I think the NeXT is great.

If you have concrete problems using the machine its great to post them and get answers - but your flames are not real constructive, and take up bandwidth.  Its difficult for people to help get you going when you don't describe your problem.  Besides - if you figured out how to post, you can figure out how to use kermit.

First, is the machine at home or at school, who is the SA, and is it in a network?
Second, I assume you're using 2.0 on a 040 board (you said you had a station?)
Third, a little advice (hope I dont get flames from everyone else for this...)  don't use tip - its a pain in the ass to use  compared to kermit (which isn't exactly what NeXT considers user friendly either).

To use my NeXT, I had to master the following languages: English.  
I open a terminal (Stuart, actually - good job Scott!), type "kermit" and type ATDP{tlf number} to connect with the VAX at school. I log in, and can then use ftp, telnet, etc over the net at school to reach around the globe.  All this can be automated using kermit scripts - but its not neccessary to start with.

If you want to make it real simple - download the binary for kermit - you save disk place and headaches if you aren't confident using make.  Put it in ~/Apps or /LocalApps (you might have to make the directory first - choose new folder from the workspace manager)
Check the permissions (using inspector under 2.0, more info... under 1.0) so that you have execute permission (otherwise you won't be able to run it).
The tricky part is getting a cable that will work with your modem.  Consult the comp.sys.next FAQ for this, or NeXT Answers, available from cs.orst.edu.

 O.K.  We'll assume you got the modem set up, since you said your problem was getting an exec file downloaded from your VAX.
delete the problem files you downloaded previously (clean slate approach ;-).
Log on to the VAX.
If you're going to get something from the net using FTP make sure you use binary file transfer - give the command "bin before you "get" or "mget" anything.
When you transfer UNIX files, its often easiest to specify a name the VAX can deal with - Cassandra14a.dist.tar.Z will cause problems.  By doing :
ftp>bin
type set to bin ok
ftp>get Cassandra14a.dist.tar.Z   Cass14.tarz
PORT OK...etc
Then the VAX wont choke on the file names.

When you use kermit, check first your vmskermit.ini file to see what defaults have been set.  Here at the University of Bergen we use packet size 1000, file type bin, parity even.  The kermit on your station must be set up identically or you'll get garbage.  If you don't already have a .kermitrc (on your local machine) make one, same for vmskermit.ini.  If you set them up to be the same now you'll not have to worry about it later.  Kermit has extensive documentation - so this shouldn't be a problem.  To be










gin with you can always type "?" to get a list of commands and a short summary of what you do to get started - usually something like this:
kermit>set modem dialer hayes (if you use a Hayes compatible modem)
kermit>set baud 2400 (use your modems baud rate)
kermit>set line /dev/cua (or cub for serial port b)
then you can type "c" and return and see if you can talk to your modem.  Try AT (return).
	etc...

Any exec files must be transferred binary (i.e. set file type binary).
When you get the files on your station, rename them (or at least change the suffix to the original - *.tar.Z in our example) and do:
localhost>uncompress {filename.Z}
localhost>tar -xvf {filename.tar}
Check the execute bits with inspector or protect (2.0 and 1.0 respectively) and you should be all set.  After you verify the program works you can move it to a directory of your choice (most probably /LocalApps on a standalone machine).  If it doesn't work, well:

1) review the points above
2) consider that the program maybe wasn't designed/written/compiled for the NeXT...
3) ask the net for help - give a detailed description and error messages (or a transcript of your session if you have one)  Useful info can be had from console, coredumps, and the terminal if you used it to run/check the program.

I experienced that its usually easiest to download the binary of a file (i.e. the exec file) - I have little disk place and don't need to do make to keep everything up to date.  At school things get more complicated and we have source for about everything, and a system admin who maintains it all.

I hope this helps.  As I said - I think the NeXT is a fantastic machine, I would never go back to OS/2 after using NeXT Step.  Maybe if you read a little less and use the machine a little more you'll get the hang of things.  Then you can read the manuals, set up your programming environment (if you're a programmer), etc.

Good luck.



--
Thor-Lee Legvold                 |         ppstl@nobergen.earn (or .bitnet)
University of Bergen             |         ppstl@cc.uib.no
NORWAY                                |        and now on NeXT...
Hvor mye for datter'n din...? |        me@fiol.uib.no