Not in the slightest. It works on Windows, Linux, and OSX. On 6/15/2011 11:17 AM, Jacob Kruger wrote:
Cool. Thanks. will check/try it out.One last question (for now) - sort of presume this will only really work on windows platform for now?TIA Jacob Kruger Blind Biker Skype: BlindZA '...fate had broken his body, but not his spirit...' ----- Original Message ----- From: "Q" <q@xxxxxxxxxxxxxxxxxx> To: <programmingblind@xxxxxxxxxxxxx> Sent: Wednesday, June 15, 2011 3:55 PM Subject: Re: Panning Soundsfirst, instantiate an output (this calls BASS_OutputInit and can later be used to modify global volume etc.)from sound_lib import output, stream import time#Used for a demonstration OUTPUT = output.Output() Then, a file stream fs = stream.FileStream(file=r"c:\windows\media\tada.wav") Then, do whatever you'd like with the stream: def move_it(sound): sound.pan = -1 sound.play() for i in xrange(-10, 10):sound.pan = i / 10.0 #work around xrange not being able to supply floatstime.sleep(0.05) move_it(fs) Hope this helps, Q On 6/15/2011 7:53 AM, Jacob Kruger wrote:Ok, one more silly question - how do I link either the FileStream, or the channel to a specific file, etc.?If I try initialising the FileStream object with what I think is sort of a call to it's __init__ method, it seems to mention the following parameters, and really not too sure what all of them should/would be - that's assuming need to provide some of them since think this is an underlying part of the process being mentioned in the trace back, or something:bass_call(BASS_StreamCreateFile, mem, file, offset, length, flags) As in, I would have assumed something like: fs = sound_lib.stream.FileStream("file.mp3") would have done it, but now not sure as such. TIA Jacob Kruger Blind Biker Skype: BlindZA '...fate had broken his body, but not his spirit...' ---original message--- From: "Q"<q@xxxxxxxxxxxxxxxxxx> To:<programmingblind@xxxxxxxxxxxxx> Sent: Tuesday, June 14, 2011 3:29 PM Subject: Re: Panning SoundsJacob, You are ... Not quite going about this in the correct way. You should install Distribute, available from http://pypi.python.org/pypi/distributeThis will provide the setuptools package, which is used to install mostmodern Python packages. Once this is done, navigate to the folder and run: python setup.py installwhich will actually install the library into your site-packages directoryand add it to the global package registry.As for documentation, I must admit that sound_libs is limited, but here'sthe general idea: Bass, the underlying library provides functions such asBASS_ChannelPlay, which takes as an argument the handle of a channel toplay. The library models a pseudo-OO structure, with output streams andrecordings inheriting the methods of channels, so I followed this in mywrapper. So once you instantiate, for instance, asound_lib.stream.FileStream object, you can then call play on this objectand it will call BASS_ChannelPlay with the channel's handle, which the object stores upon instantiation.Furthermore, Bass has many getters and setters which I have replaced withPython properties--so instead of calling BASS_ChannelSetAttribute(<channel_handle>, BASS_AttribPan, -1.0) you can just go: channel.pan = -1 I hope this is enough to get you started, and if you have any more questions feel free to contact me off-list. Q On 6/14/2011 8:25 AM, Jacob Kruger wrote:Ok, think figured it out since see that there's a main.py file in actual sound_lib subdirectory, so can copy that folder/directory over whereverand then reference it and the objects/modules under there from withinpython interpreter, using import statement, and see there's also a .chmhelp file there, so let me play around a bit. Stay well Jacob Kruger Blind Biker Skype: BlindZA '...fate had broken his body, but not his spirit...' ----- Original Message --------------- Subject: Re: Panning Sounds From: Jacob Kruger<jacobk@xxxxxxxxxxxxxx> Date: Tue, 14 Jun 2011 14:04:08 +0200 To: programmingblind@xxxxxxxxxxxxxOk, if I want to try implement use of your soundlib library, how do I get it to execute the setup.py code since when I tried it under python 2.7, I first had to change the first line to in fact import setup from distutils.core - as opposed to setuptools, but distutils.core doesn'tseem to have any find_packages inside/underneath it?Do I need to run this under a different version of python, or do I not really need to run setup.py to actually make use of this under pythonitsself, and in that case, which modules should I initially tryimporting then, and/or where should I copy the contents of the .gz fileI downloaded to under python27's installation directory? Sorry, but am still relatively new to python itsself, and hence am rather asking these questions. Stay well Jacob Kruger Blind Biker Skype: BlindZA '...fate had broken his body, but not his spirit...' ----- Original Message --------------- Subject: Re: Panning Sounds From: Q<q@xxxxxxxxxxxxxxxxxx> Date: Tue, 14 Jun 2011 07:27:41 -0400 To: programmingblind@xxxxxxxxxxxxxIf you want to perform this programmatically, use my sound_lib packagehttp://hg.qwitter-client.net/sound_libAnd set the .pan property of the sound from -1 to 1 with 0 being themiddle.If you're looking to just modify sounds, grab Audacity (the 1.3 beta,open the sound, and use I believe shift+p on the track, or effects, pan... It likewise ranges from -1 to 1. On 6/14/2011 7:12 AM, Homme, James wrote:Hi,It looks like Windows Recorder can't do this. I want to take a sound and pan it to one side or the other. Is there a utility that can dosomething like this? Thanks. Jim Jim Homme, Usability Services, Phone: 412-544-1810. This e-mail and any attachments to it are confidential and areintended solely for use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this e-mail without the author's prior permission. The views expressed in this e-mail message do not necessarily represent the views of HighmarkInc., its subsidiaries, or affiliates.--------------060007050207050706000401 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> If you want to perform this programmatically, use my sound_lib package<br> <a class="moz-txt-link-freetext"href="http://hg.qwitter-client.net/sound_lib";>http://hg.qwitter-client.net/sound_lib</a><br> And set the .pan property of the sound from -1 to 1 with 0 beingthe middle.<br>If you're looking to just modify sounds, grab Audacity (the 1.3 beta, open the sound, and use I believe shift+p on the track, oreffects, pan... It likewise ranges from -1 to 1.<br> <br> <br> On 6/14/2011 7:12 AM, Homme, James wrote: <blockquotecite="mid:AB5137F7193A8D49A42CA31303E3FDD544B1F700@xxxxxxxxxxxxxxxxxx"type="cite"> <meta http-equiv="Context-Type" content="text/html; charset=us-ascii"> <div> <p>Hi,</p> <p>It looks like Windows Recorder can't do this. I want to take a sound and pan it to one side or the other. Is there a utility that can do something like this?</p> <p> </p> <p>Thanks.</p> <p> </p> <p>Jim</p> <p> </p> <p>Jim Homme,</p> <p>Usability Services,</p> <p>Phone: 412-544-1810.</p> <p> </p> </div> <br>This e-mail and any attachments to it are confidential and are intended solely for use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this e-mail without the author's prior permission. Theviews expressed in this e-mail message do not necessarily represent the views of Highmark Inc., its subsidiaries, or affiliates.<br> </blockquote> <br> </body> </html> --------------060007050207050706000401-- __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind__________ View the list's information and change your settings at //www.freelists.org/list/programmingblind__________ View the list's information and change your settings at //www.freelists.org/list/programmingblind__________ View the list's information and change your settings at //www.freelists.org/list/programmingblind__________ View the list's information and change your settings at //www.freelists.org/list/programmingblind__________View the list's information and change your settings at //www.freelists.org/list/programmingblind__________View the list's information and change your settings at //www.freelists.org/list/programmingblind
__________View the list's information and change your settings at //www.freelists.org/list/programmingblind