Well the lossless mode works in the following way: when you open a sound it saves the original sound and its image as it was originally analysed, and keeps that pair around until another sound is opened. If it's another image those are still around in case that image can be used for lossless mode by comparing the original image to the new image to modify (filter) the original sound.Waldbaer wrote:Oh, I did not even think about importing additional sounds until now... hm, breaking the lossless mode is not fine, of course (well I don't understand why adding silence to a layer should break the lossless mode, but you will, probably. ). Maybe you could just let the user decide: Insert a message offering to crop the audio to import, resize it without the lossless mode on that layer or just cancel the import.
I'm actually wondering how PS works internally using the layers - at the moment they are just visual, aren't they? If you offer to import sounds, you'll necessarily have to implement some kind of track management, e.g. lossless-mode on/off for each layer separately, sound and picture based layers, won't you? My idea for the moment was just to add an import/export feature for visual layers - probably this is much less work for you but will already offer many creative possibilities by bringing the possibilities of external image editing to mulitlayer-projects. And if someone wants to import another sound file, he might even workaround it by opening the file to import all alone at first, exporting it as .bmp and then importing it into his main project...
If the new image is different in size it just assumes that image does not match the original image-sound pair, and it wouldn't know what to do with it anyway, if it's shorter then how can we assumed it's cropped, and if it's longer do we pad it with silence? (it's kind of pointless).
For importing I think it's a good idea to let the user choose between either a fitted import or a cropped import, maybe even an expanding import for adding longer images/sounds (if you don't care about lossless). In the eventual rewrite I want to have a more DAW-like approach, basically make it a DAW except it would be mostly based on graphical data and processing instead of pure audio, so yeah I'd like to have separate synthesis modes for each layer/groups of layers/track which would be lossless mode, noise synthesis (Photosounder's current default), additive FM synthesis for vector layers and possibly a simple audio mode where you could just add sounds (let's say you want to overlay a drum loop without processing it, but still want to see it visually and like adjust its volume) without the CPU and memory expense of (live!) lossless processing. And the way I see it this way you wouldn't have a fixed document size, it would be more like a multitrack editor where how you position each track determines the length of it, so each "track" could exist more independently from the rest, mostly for lossless.
Well let's say you want to crop between 50 seconds and 72 seconds, you can already crop using a two-line script containing the following commands:sl1914 wrote:Normally I'm not interested in the sound produced from the whole image. Just part of it.
So: would it be possible to add loop start/end markers, like sample players normally have? These would control which part of the image is used to create sound and it would be used also when saving the image.
This way I wouldn't need to load the output wav file to a sample editor and crop the sound. And since the sound changes depending on the image, it's much easier to find the correct loop start/end based on the source image - since the waveform usually looks like monotonous noise in a sample editor.
IMO this feature would be super useful.
Code: Select all
Move layer -50 sec x +0 st
Crop 22 sec x 100 %
I know it would be better if there was a built-in tool for that as you described it but I can't really make dialogs or text input or new types of controls because I'm using a framework (SDL) which is better suited for 2D game development, which is a big roadblock, hence the Qt rewrite. Also it breaks the lossless mode for reasons outlined above, I know I'll make something more suitable in the rewrite but in the meantime it would be hard to really change that.
Wait I just had an idea, I could make a dumb simple Crop tool which would consist it in making the click of the mouse on the image crop everything right of it. That could do the trick. I could do one that does the same for cutting off the left side although I have mixed feelings about how it might affect some convolution modes if you crop a multi-layer document, but I guess I could do that too.