Help needed for a script

Roadkill2

Active Member
Joined
Nov 20, 2009
Messages
75
Reaction score
0
Location
Cape Town
Please note, i am far from a Programming Guru God, and more of a practical worker.

Basically replacing an audio file, in a folder, with another recording from a different file, using the same filename.

I would need to juggle 3 or 4 different audio files.

This process needs to be looped, between the files, with a setable pause between.

The software i am using is can only be set to use 1-off "Filename & location"

Any help would be appreciated.

In other words, (Language i understand) i need to click "Next" on a looped playlist, but the filename & Location cannot change.
 
What is the purpose of keeping the same title, but use different audio tracks?

Can you maybe be more specific? Like what "software" you are referring to?
 
Please note, i am far from a Programming Guru God, and more of a practical worker.

Basically replacing an audio file, in a folder, with another recording from a different file, using the same filename.

I would need to juggle 3 or 4 different audio files.

This process needs to be looped, between the files, with a setable pause between.

The software i am using is can only be set to use 1-off "Filename & location"

Any help would be appreciated.

In other words, (Language i understand) i need to click "Next" on a looped playlist, but the filename & Location cannot change.

Think you are looking for a Flash loop player that plays the files in the folder.
Have a look here:
http://activeden.net/search?utf8=âś“&term=flash+player

If you need a custom thing, PM me with your details :D
 
Its for Windows 7 64bit. The program can only be set to play a specific destination file, when an event happens. eg. (C:\Windows\Media\chimes.mp3)

The Source Files are different audio recordings with the same filename, but in different folders.


My programming logic is as follows:

- copy C:\Windows\AUDIO 1\chimes.mp3
- overwrite C:\Windows\Media\chimes.mp3
- pause for 5 seconds

- copy C:\Windows\AUDIO 2\chimes.mp3
- overwrite C:\Windows\Media\chimes.mp3

- copy C:\Windows\AUDIO 3\chimes.mp3
- overwrite C:\Windows\Media\chimes.mp3
- pause for 5 seconds

etc.

With the below functions:
1) It must then loop through the above.
2) Pauses can be adjusted.
2) Pause if the destination file is in use eg. (C:\Windows\Media\chimes.mp3)
3) Continue the loop.

A practical demonstration is to think of the following;
1) A circle of friends and myself, each hold a different brand of beer, only i can drink whats in my hand (specific destination file).
2) They each pass the beer to their left.
3) At a random time, i must be able to drink what is in my hand.

The example above illustrates that it may be Castle or Black Label or Windhoek Draught.

It seems so easy with the above example, but this Fandangled computer stuff gets me.
 
Does it overwrite the same file? what is the purpose of overwriting the same file in a loop? is another program reading the file every time it changes?
 
Does it overwrite the same file? what is the purpose of overwriting the same file in a loop? is another program reading the file every time it changes?

The other program only reads the file randomly.

Yes it does overwrite the destination file . The other files are different audio recordings, but they must have the same filename.mp3 As the program is locked to (C:\Windows\Media\chimes.mp3) as an example.

Its sort of when your wife asks, Does my bum look fat in this? Your automated response is still, from your "Panic Response Folder" :-)
 
Last edited:
Thanks Faultyboy, your help is much appreciated. I feel that you are getting close, but i cannot seem to make it work on my side. It keeps playing the chimes.wav, even though i see your program switching between the files.

I can set my program to read,
C:\Users\Roadkill2\Desktop\Location File\chimes.wav (I Guess i add this in your "Location file")

I need the below audio files as varialbles (I guess I use your "Add File" tab)


C:\Users\Roadkill2\Desktop\sounds\Chord\chord.wav
C:\Users\Roadkill2\Desktop\sounds\ir_begin\ir_begin.wav
C:\Users\Roadkill2\Desktop\sounds\ir_end\ir_end.wav
C:\Users\Roadkill2\Desktop\sounds\notify\notify.wav
C:\Users\Roadkill2\Desktop\sounds\ringout\ringout\wav


To test i did the following
1) I pasted the exact file strings above in your program, but cannot get it to work, with and without the .wav file extention.
2) I even renamed the "notify.wav" file to "chimes.wav" in the "notify" folder.

Your program is also not reverting back to the top of the sequence of variables, but i assume that can be addressed later.

Thanks a mill. Its not an urgent project, but just something that is bugging me. I know i can do it mechanically, as per my beer analogy. The concept seems simple to me, but the program is not.

I know the Matrix is there, but i cannot see it:-)

Can you also give me a clue how you did it, as i am keen to learn.
 
No problem :) It's not much trouble. I never tested it with .wav files only with .txt files but the file type shouldn't matter.

yes input the exact location of the file then click add(including extension). you can add as many files as you need and from all different locations.
It should then copy and overwrite the highlighted file to the new location with whatever file name you put in the location file textbox. Rest time is the time it rests between files in seconds.

so it will look like this..

C:\Users\Roadkill2\Desktop\sounds\Chord\chord.wav
C:\Users\Roadkill2\Desktop\sounds\ir_begin\ir_begin.wav
C:\Users\Roadkill2\Desktop\sounds\ir_end\ir_end.wav
C:\Users\Roadkill2\Desktop\sounds\notify\notify.wav
C:\Users\Roadkill2\Desktop\sounds\ringout\ringout\randomfile.wav

The the single location all the files will overwrite...

C:\location\test.wav

I'm testing it now and will see why its not work properly... :)
 
Re download and try again please...

Ill upload the source once it's bug free and working properly.. ;)

Should be fine now.. sorry uploaded the wrong file to db... :)
 
Last edited:
Still sruggling to understand the practical concept? Is this for varsity?

I think its because he want's to change the file randomly out with other files. But the program that uses the file only accepts it as one file name. instead of having to change it out manually and rename a bunch of files that might need there names where they are.
also if this needs to be cycled through quickly it would be a waste of time trying manually..
 
Thanks Faultyboy, works 100%.:D You hit the nail on the head, both with your description of the problem and your program.

I will do more rigorous tests tomorrow. To find out if there is an issue if the "Location File" is busy being used.

If you add a save button, once all the info is setup. I may be inclined to send you 6 x Man Flowers for your effort, but its fine as it is.:)

If Mybroadband had a Beer icon, i would give you one now:D
 
:) no problem dude. Glad I'm able to help :) Plus I work with VB.Net all day so a little app like this doesn't take much time..

Please check again for me and give me an update... shot.. :)
 
It works. The only "bug" is, (But it does not break the program)

1) I click your "Start" icon, the program runs 100%
2) I then click the "Stop" icon
3) I am unable to use the "Start" icon again

I have to exit out the program and restart it. Its not an issue for me. But if you fix it, i would say the program is complete. And deserving of your Beers. Please PM me your details to arrange it.
 
Last edited:
I am busy downloading the project file, but Web Africa is attending to the "Slow ADSL" Problem.

The new one works a treat
 
Top
Sign up to the MyBroadband newsletter
X