Csound Csound-dev Csound-tekno Search About

[Cs-dev] csdplayer sources?

Date2007-12-11 13:02
FromVictor Lazzarini
Subject[Cs-dev] csdplayer sources?
What has happened to the csdplayer java sources? I cannot find it anywhere in
CVS. Who took them off? That surely has to be a break in etiquette, as I
don't remember being consulted about it.

I don't think I have it anywhere else, so it's probably lost.

Victor
Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth


-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2007-12-11 13:27
FromRory Walsh
SubjectRe: [Cs-dev] csdplayer sources?
One of my ex-students most likely has a copy of it as he used it in one 
of his MA projects. If nothing appears on the list I will give him a 
shout, I might even have it here myself..

Rory.


Victor Lazzarini wrote:
> What has happened to the csdplayer java sources? I cannot find it anywhere in
> CVS. Who took them off? That surely has to be a break in etiquette, as I
> don't remember being consulted about it.
> 
> I don't think I have it anywhere else, so it's probably lost.
> 
> Victor
> Victor Lazzarini
> Music Technology Laboratory
> Music Department
> National University of Ireland, Maynooth
> 
> 
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: 
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2007-12-11 13:32
FromRory Walsh
SubjectRe: [Cs-dev] csdplayer sources?
AttachmentsCSDPlayer.java  None  None  
Is this the one? It may have been hacked it a little, it's all I could 
find. Cheers,

Rory.



Date2007-12-11 14:03
FromVictor Lazzarini
SubjectRe: [Cs-dev] csdplayer sources?
Thanks

At 13:32 11/12/2007, you wrote:
>Is this the one? It may have been hacked it a little, it's all I could 
>find. Cheers,
>
>Rory.
>
>
>
>
>
>
>import java.io.*;
>import javax.swing.JFrame;
>import java.io.File;
>import java.lang.System;
>import java.util.Properties;
>import javax.swing.JFileChooser;
>import javax.swing.filechooser.FileFilter;
>import csnd.*;
>
>/**
>  *
>  * @author  Victor Lazzarini, 2005
>  */
>
>public class CSDPlayer extends javax.swing.JFrame {
>
>     private csperf cs;
>     private Thread a;
>     private JFileChooser choose;
>     private boolean ready;
>     private String csdfile = "";
>     private javax.swing.JButton stopButton;
>     private javax.swing.JButton pauseButton;
>     private javax.swing.JButton playButton;
>     private javax.swing.JButton openButton;
>     private javax.swing.JButton editButton;
>     private javax.swing.JButton quitButton;
>     private javax.swing.JPanel mainPanel;
>
>     public CSDPlayer( ) {
>         initComponents();
>         choose = new JFileChooser();
>         FileFilter fil = new CSDFilter();
>         choose.addChoosableFileFilter(fil);
>         ready = false;
>     }
>
>     public CSDPlayer( String filename ) {
>         csdfile = filename;
>         initComponents();
>         choose = new JFileChooser();
>         FileFilter fil = new CSDFilter();
>         choose.addChoosableFileFilter(fil);
>         ready = false;
>     }
>
>     private void initComponents() {
>         mainPanel = new javax.swing.JPanel();
>         playButton = new javax.swing.JButton();
>         pauseButton = new javax.swing.JButton();
>         stopButton = new javax.swing.JButton();
>         openButton = new javax.swing.JButton();
>         editButton = new javax.swing.JButton();
>         quitButton = new javax.swing.JButton();
>
>         quitButton.setText("quit");
>
> 
>setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
>         playButton.setText("play");
>         playButton.addActionListener(new java.awt.event.ActionListener() {
>                 public void actionPerformed(java.awt.event.ActionEvent evt) {
>                     playButtonActionPerformed(evt);
>                 }
>             });
>
>         mainPanel.add(playButton);
>
>         pauseButton.setText("pause");
>         pauseButton.addActionListener(new java.awt.event.ActionListener() {
>                 public void actionPerformed(java.awt.event.ActionEvent evt) {
>                     pauseButtonActionPerformed(evt);
>                 }
>             });
>
>         mainPanel.add(pauseButton);
>
>         stopButton.setText("Stop");
>         stopButton.addActionListener(new java.awt.event.ActionListener() {
>                 public void actionPerformed(java.awt.event.ActionEvent evt) {
>                     stopButtonActionPerformed(evt);
>                 }
>             });
>
>         mainPanel.add(stopButton);
>
>         openButton.setText("open CSD");
>         openButton.addActionListener(new java.awt.event.ActionListener() {
>                 public void actionPerformed(java.awt.event.ActionEvent evt) {
>                     openButtonActionPerformed(evt);
>                 }
>             });
>
>         mainPanel.add(openButton);
>
>         editButton.setText("edit");
>         editButton.addActionListener( new java.awt.event.ActionListener() {
>                         public void actionPerformed( 
> java.awt.event.ActionEvent evt) {
>                                 editButtonActionPerformed(evt);
>                         }
>         });
>         mainPanel.add(editButton);
>
>         quitButton.setText("quit");
>         quitButton.addActionListener(new java.awt.event.ActionListener() {
>                 public void actionPerformed(java.awt.event.ActionEvent evt) {
>                     quitButtonActionPerformed(evt);
>                 }
>             });
>
>         mainPanel.add(quitButton);
>
>         getContentPane().add(mainPanel, java.awt.BorderLayout.NORTH);
>         setTitle("CSDPlayer");
>         pack();
>     }
>
>     private void editButtonActionPerformed(java.awt.event.ActionEvent evt) {
>         if( csdfile != "" )
>         {
>                 TextEditor editor = new TextEditor( csdfile );
>                 editor.setVisible(true);
>         }
>     }
>
>
>     private void quitButtonActionPerformed(java.awt.event.ActionEvent evt) {
>         if (ready) {
>             cs.stop();
>             try {
>                 while (a.isAlive());
>             } catch (Exception e) {
>                 java.lang.System.exit(0);
>             }
>         }
>         java.lang.System.exit(0);
>     }
>
>     public void quit()
>     {
>         if (ready) {
>                 cs.stop();
>                 try {
>                         while (a.isAlive());
>                 } catch (Exception e) {
>                         java.lang.System.exit(0);
>                 }
>         }
>         java.lang.System.exit(0);
>     }
>
>     private void openButtonActionPerformed(java.awt.event.ActionEvent evt) {
>         if (choose.showOpenDialog(this) != choose.CANCEL_OPTION) {
>             File csd = choose.getSelectedFile();
>             if (ready) cs.stop();
>             csdfile = csd.getAbsolutePath();
>             setTitle("CSDPlayer " + csd.getName());
>         }
>     }
>
>     private void stopButtonActionPerformed(java.awt.event.ActionEvent evt) {
>         if (ready) {
>             cs.stop();
>         }
>     }
>
>     private void playButtonActionPerformed(java.awt.event.ActionEvent evt) {
>         if (ready)
>             cs.play();
>         else if (csdfile != "") {
>             cs = new csperf(csdfile);
>             a = new Thread(cs);
>             a.start();
>             ready = true;
>         }
>     }
>
>     private void pauseButtonActionPerformed(java.awt.event.ActionEvent evt) {
>         if (ready)
>             cs.pause();
>     }
>
>     public static void main(String args[]) {
>         java.awt.EventQueue.invokeLater(new Runnable() {
>             public void run() {
>                 new CSDPlayer().setVisible(true);
>             }
>         });
>     }
>
>     public class csperf implements Runnable {
>
>         Csound csp;
>         boolean on;
>         boolean pause;
>         String  csd;
>
>         public csperf(String s) {
>             csd = s;
>             on = false;
>             pause = false;
>             csp = new Csound();
>         }
>
>         public void run() {
>             try {
>                 int res = csp.Compile(csd, "-m0", "-d");
>                 if (res == 0) {
>                     on = true;
>                     while (on) {
>                         if (pause)
>                             csnd.csoundSleep(30);
>                         else if (csp.PerformBuffer() != 0)
>                             on = false;
>                     }
>                 }
>             }
>             catch (Exception e) {
>                 java.lang.System.err.println("Could not Perform...\n");
>                 java.lang.System.exit(1);
>             }
>             csp.Reset();
>             ready = false;
>         }
>         public void stop() {
>             on = false;
>         }
>         public void pause() {
>             pause = !pause;
>         }
>         public void play() {
>             pause = false;
>         }
>         public boolean isOn() {
>             return on;
>         }
>     };
>
>     public static class CSDFilter extends FileFilter {
>         public boolean accept(File pathname) {
>             if (pathname.isDirectory())
>                 return true;
>             String csd = pathname.getAbsolutePath();
>             if (csd.length() < 5)
>                 return false;
>             return csd.toLowerCase().endsWith(".csd");
>         }
>         public String getDescription() {
>             return "Unified Csound files";
>         }
>     };
>};
>
>-------------------------------------------------------------------------
>SF.Net email is sponsored by:
>Check out the new SourceForge.net Marketplace.
>It's the best place to buy or sell services for
>just about anything Open Source.
>http://sourceforge.net/services/buy/index.php_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth


-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2007-12-11 17:03
From"Steven Yi"
SubjectRe: [Cs-dev] csdplayer sources?
AttachmentsNone